This commit is contained in:
Adria Navarro 2024-11-07 12:15:45 +01:00
parent 1ad8e0d458
commit 518191b882
1 changed files with 1 additions and 11 deletions

View File

@ -1,5 +1,5 @@
import events from "events"
import { newid, timeout } from "../utils"
import { newid } from "../utils"
import { Queue, QueueOptions, JobOptions } from "./queue"
interface JobMessage {
@ -184,16 +184,6 @@ class InMemoryQueue implements Partial<Queue> {
// do nothing
return this as any
}
async waitForCompletion() {
do {
await timeout(50)
} while (this.hasRunningJobs())
}
hasRunningJobs() {
return this._addCount > this._runCount
}
}
export default InMemoryQueue