Skip to content

Commit 20edd46

Browse files
committed
chore: add missed method in queue
1 parent 2fbd7cb commit 20edd46

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

dotnet/src/BullMQ/Queue.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,13 @@ public async Task<IReadOnlyList<Job>> GetJobsAsync(
206206
return jobs;
207207
}
208208

209+
/// <summary>Returns the number of jobs for each requested priority.</summary>
210+
public async Task<long[]> GetCountsPerPriorityAsync(IReadOnlyList<long> priorities)
211+
{
212+
var backend = await _backend.Value.ConfigureAwait(false);
213+
return await backend.GetCountsPerPriorityAsync(priorities).ConfigureAwait(false);
214+
}
215+
209216
/// <summary>Returns waiting jobs.</summary>
210217
public Task<IReadOnlyList<Job>> GetWaitingAsync(int start = 0, int end = -1) =>
211218
GetJobsAsync(new[] { "waiting" }, start, end, asc: true);

0 commit comments

Comments
 (0)