MCPcopy Create free account
hub / github.com/WebDevSimplified/job-queue / constructor

Method constructor

src/job-queue/worker.ts:10–18  ·  view source on GitHub ↗
(
    queue: Queue<T>,
    processJob: (job: Job<T>) => Promise<void>,
    { concurrency = 1 } = {}
  )

Source from the content-addressed store, hash-verified

8 private activeJobs: Map<string, Promise<void>> = new Map()
9
10 constructor(
11 queue: Queue<T>,
12 processJob: (job: Job<T>) => Promise<void>,
13 { concurrency = 1 } = {}
14 ) {
15 this.processJob = processJob
16 this.queue = queue
17 this.concurrency = concurrency
18 }
19
20 async start() {
21 while (true) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected