Ok, so this post to the forum is literally my last resort here. I have gotten myself into a bit of a pickle with Hangfire and need some solutions to stop it doing what it is doing.
Firstly, i’m working with Hangfire in my development environment, using Redis as my storage.
We had a bit of code from one of my developers that has a loop and under certain conditions the logic within the loop failed but did not break out of the loop. In this scenario it writes infinite error logs to the DB using hangfire for this. Obviously we are in the midst of development so this was identified and already patched up.However, now, every time i start the application on my development machine, the Hangfire dashboard immediately lights up with over 32000 thousand enqueued jobs that it immediately begins processing and writing to our DB.
Is there no way to wipe out the storage of all enqueued items? I mean this is creating a bit of a mess and the only way to stop it is to not run our application. Surely there should be some reset mechanism in place that can be used while working with Hangfire in development?
Also, how does Hangfire manage code changes? What are the best practices with working with Hangfire in development and then moving to Production? If code changes does Hnagfire wipe all pending jobs? Is there any explanation of how Hangfire handles code base changes? And how should we be setting up Hangfire in development vs. production to avoid code base conflicts?