MCPcopy Create free account
hub / github.com/dadi/api / dequeueBackgroundJob

Method dequeueBackgroundJob

dadi/lib/workQueue.js:20–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18 }
19
20 dequeueBackgroundJob() {
21 if (this.debounceTimer) {
22 return
23 }
24
25 this.debounceTimer = setTimeout(() => {
26 const job = this.backgroundPool.shift()
27
28 if (typeof job === 'function') {
29 job.call(this)
30 }
31
32 this.clearDebounceTimer()
33 }, this.debounceTime)
34 }
35
36 finishForegroundJob(key) {
37 return this.foregroundPool.delete(key)

Callers 1

startBackgroundQueueMethod · 0.95

Calls 1

clearDebounceTimerMethod · 0.95

Tested by

no test coverage detected