Reputation: 11
I have method, as part of zeebe workflow job. And when it fails, I want to restart all job. I found, that it can be done with NewFailJobCommand, but it seems that the job fails on the first try. How I can restart the job if it fails?
err := w.workflowStore.InitScanEventsTTL(ctx, scanID, job.Msg.Tenant)
if err != nil {
return w.client.NewFailJobCommand().JobKey(job.Key).Retries(job.Retries -
1).ErrorMessage(reason).Send(ctx)
}
Upvotes: 0
Views: 353
Reputation: 4877
You need to specify the retry count in the task properties in the process model.
Upvotes: 0