I would like to start a server and monitor the queue.
Once the queue is empty, I’d like to stop the server.
How would I go about doing that?
I have a console app that adds jobs to the default queue. This app will terminate once the addition of jobs completes.
The hangfire server is another console app. I don’t want to keep this running after all the jobs have been processed and the other app has stopped.