Skip to content

Commit bb39afa

Browse files
committed
exposing getjobcounts
1 parent 06a2c91 commit bb39afa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

backend/src/queues/monkey-queue.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ export class MonkeyQueue<T> {
4141
await this.jobQueue.add(taskName, task, jobOpts);
4242
}
4343

44+
async getJobCounts(): Promise<{
45+
[index: string]: number;
46+
}> {
47+
if (!this.jobQueue) {
48+
return {};
49+
}
50+
51+
return await this.jobQueue.getJobCounts();
52+
}
53+
4454
async addBulk(
4555
tasks: { name: string; data: T; opts?: BulkJobOptions }[]
4656
): Promise<void> {

0 commit comments

Comments
 (0)