I am trying to retrieve the enqueued jobs in Hangfire, using the following code:
IMonitoringApi monitor = JobStorage.Current.GetMonitoringApi();
var jobData = monitor.EnqueuedJobs(?, 0, 1);
The api says the first parameter is a string, (string queue). My question is, what does that string queue indicate and how do I get that? Thanks
It’s a queue name which you want to get enqueued jobs for. If you don’t use custom queues, specify “default”.
Thanks for the information. Is there a way to find what the different parameters mean for various methods and possible how they are used? The documentation is incomplete.e.g. in ProcessingJobs what does from
and count
mean?
Those are for paging. All the sources are available on GitHub, so you can always look there.