I’m running Hangfire 1.5.6 on an Azure website that is hitting an Azure SQL Server.
I recently ran into a couple of the issues described here. The fix described in one of the comments (namely, truncating the Hangfire.State table) resolved the errors that were appearing in my log, but now I get an exception when I try to visit the “Succeeded Jobs” view on the dashboard (at /hangfire/jobs/succeeded). The counter still shows almost a million succeeded jobs, so I wonder if the dashboard is attempting to query the job history based on some counter that is no longer valid because the State table has been cleared out.
My question is this: is there any documented way to just completely reset the state of Hangfire by running some SQL? Specifically, I’d like to clear out the job history, reset all of the counters, etc. The recurring tasks that I use Hangfire to run are not super-critical and I don’t need to see the complete history of jobs that have run.