- Server (instance A) is processing job (1). The job (1)'s state (enqueue → processing)
- Server (instance A) dies/crashes for some reason
- Server (instance B) startup
- How will the Server (instance B) handle the job (1)?
When the job is queued (on A) it is locked. If A crashes/is restarted before the job is marked as complete it will sit until the lock expires. When the lock expires it will be queued for processing on B. Hangfire is all about trying to ensure the job is processed successfully.
You can see the best practices, mainly reentrance, for how to handle the scenario.