exposing getjobcounts

This commit is contained in:
Miodec 2023-02-01 01:57:25 +01:00
parent 06a2c91eee
commit bb39afa753

View file

@ -41,6 +41,16 @@ export class MonkeyQueue<T> {
await this.jobQueue.add(taskName, task, jobOpts);
}
async getJobCounts(): Promise<{
[index: string]: number;
}> {
if (!this.jobQueue) {
return {};
}
return await this.jobQueue.getJobCounts();
}
async addBulk(
tasks: { name: string; data: T; opts?: BulkJobOptions }[]
): Promise<void> {