Await batch job stuck coz parent Job did change its state to succeeded / deleted with Hangfire 1.6.20

queues
Tags: #<Tag:0x00007f6a05781d80>

#1

Hi,
I am facing issue while using batch job with await job. I have 5 sets of jobs and all needs to executed in specific order. Job enqueues and start processing but it takes 15 -30 min to change job state to succeeded. During that time period job appears under succeeded tab with processing state. I have implemented job state applied filter and that filter updated custom table. But Hangfire.State table doesn’t have entry for succeeded state. Due to this issue awaiting batch doesn’t started for long time and jobs start accumulated on msmq. Please help it’s not reproduce in Dev or QA.

example: 4 Job i.e. A, B, C and D should be executed in order.

  1. var parentId = job.Start(“Starting Job A”);
  2. parentId = job.AwaitBatch(parentId, “Starting Job B”, BatchContinuationOptions.OnAnyFinishedState);
  3. parentId = job.AwaitBatch(parentId, “Starting Job C”, BatchContinuationOptions.OnAnyFinishedState);
  4. parentId = job.AwaitBatch(parentId, “Starting Job D”, BatchContinuationOptions.OnAnyFinishedState);

Job ‘B’ has executed its success Jobfilter but Dashboard shows as processing (upto 40-50 mins). In Hangfire.State table there is no entry found for Succeeded state. Hence, Job C doesn’t starts.

Screen shot:

Please let me know if further information required.

Thanks