From 7643ad364f05b59aa92ccc4b6553695ca32e7462 Mon Sep 17 00:00:00 2001 From: Cezary Tarnowski Date: Mon, 4 Apr 2022 11:54:25 +0200 Subject: [PATCH] allow null in retries external task's response to allow to indicate first retry --- external-task.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/external-task.go b/external-task.go index 90b880f..41ca8c8 100644 --- a/external-task.go +++ b/external-task.go @@ -35,8 +35,8 @@ type ResExternalTask struct { ProcessInstanceId string `json:"processInstanceId"` // The id of the tenant the external task belongs to TenantId string `json:"tenantId"` - // The number of retries the task currently has left - Retries int `json:"retries"` + // The number of retries the task currently has left. Could be null in case retries were not set earlier and this is the first retry. + Retries *int `json:"retries"` // A flag indicating whether the external task is suspended or not Suspended bool `json:"suspended"` // The id of the worker that possesses or possessed the most recent lock @@ -192,8 +192,8 @@ type ResLockedExternalTask struct { ProcessInstanceId string `json:"processInstanceId"` // The id of the tenant the external task belongs to TenantId string `json:"tenantId"` - // The number of retries the task currently has left - Retries int `json:"retries"` + // The number of retries the task currently has left. Could be null in case retries were not set earlier and this is the first retry. + Retries *int `json:"retries"` // The id of the worker that possesses or possessed the most recent lock WorkerId string `json:"workerId"` // The priority of the external task