But i am trying to put a button to restart the failed background job via our application’s Log Dashboard, functioning just like the hangfire dashboard’s failed page retry button,
and i can’t find the source code to do so.
thank you for the valueable insight.
another thing that i want to make sure is,
if i make fixes or changes in the method (without changing method parameters), and i requeue the failed job, it will run the new method with same parameter values right ?
but if i make changes to method parameters, then that failed job should not be requeued, and this is one of the things i have to be careful about.
Job parameters are persisted in the repo/store … So a requeue would just reuse the old parameters. Again this is default behavior. Since Hangfire can be customized in any number of methods it again depends on what/how you implemented it.
I suppose you could change the persisted parameters in the repo with something like an SQL command (or equivalent for your DB of choice) and then requeue but it is something I would personally avoid. That being said I am sometimes forced to manually correct some things in my repo if for instance there was a crash or DB issue. But that is exceptional and not routine.