We are currently using Hangfire for managing background jobs in our system and we’ve encountered an issue with identifying jobs correctly in the Hangfire Dashboard UI.
Our setup involves multiple Hangfire background servers (ServerJob-1, ServerJob-2, etc.) that run jobs and report to the main Hangfire database. We use the Hangfire Dashboard UI (ServerUI-1) to monitor and track all background jobs. However, we are experiencing difficulties in properly identifying jobs in the dashboard due to the way job names are displayed.
In the Hangfire Dashboard UI, when listing the jobs, we see job entries like:
#22 Can not find the target method.
#21 Can not find the target method.
#20 Can not find the target method.
We have explored a potential workaround by creating separate DLLs or NuGet packages for each background job (e.g., ServerJob-1.dll and ServerJob-2.dll) responsible for running jobs. By attaching these DLLs or NuGets as dependencies to ServerUI-1, we can provide the necessary references to correctly identify job names. However, this approach introduces complexity and maintenance overhead, as updating and deploying these DLLs or NuGets requires interruption of the ServerUI-1 functionality.
We are looking for a more sustainable solution. One potential approach we are considering is sending the job name as a parameter when invoking background jobs. This would allow us to retain meaningful job names in the Hangfire Dashboard UI without the need for extensive dependency management.
We would be grateful if you could provide insights, recommendations, or possible solutions to help us address this challenge.