Skip to content

Commit

Permalink
Fix when opsToBundle.length is 0
Browse files Browse the repository at this point in the history
  • Loading branch information
plusminushalf committed Jan 16, 2025
1 parent d059014 commit 91b24f0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/executor/executorManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,13 @@ export class ExecutorManager {

const opsToBundle = await this.getOpsToBundle()

if (opsToBundle.length === 0) {
return
}
if (opsToBundle.length > 0) {
const opsCount: number = opsToBundle.length
const timestamp: number = Date.now()
this.opsCount.push(...Array(opsCount).fill(timestamp)) // Add timestamps for each task

const opsCount: number = opsToBundle.length
const timestamp: number = Date.now()
this.opsCount.push(...Array(opsCount).fill(timestamp)) // Add timestamps for each task

await this.bundle(opsToBundle)
await this.bundle(opsToBundle)
}

const rpm: number = this.opsCount.length
// Calculate next interval with linear scaling
Expand Down

0 comments on commit 91b24f0

Please sign in to comment.