summaryrefslogtreecommitdiff
path: root/pkg/worker/sync_worker.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/worker/sync_worker.go')
-rwxr-xr-xpkg/worker/sync_worker.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/worker/sync_worker.go b/pkg/worker/sync_worker.go
index 13e70f49..84ff5977 100755
--- a/pkg/worker/sync_worker.go
+++ b/pkg/worker/sync_worker.go
@@ -111,6 +111,15 @@ func (tw *SyncWorkerImpl) ExecWithTTL(ctx context.Context, p payload.Payload) (p
return
}
+ if tw.process.State().Value() != StateWorking {
+ tw.process.State().RegisterExec()
+ c <- wexec{
+ payload: rsp,
+ err: nil,
+ }
+ return
+ }
+
tw.process.State().Set(StateReady)
tw.process.State().RegisterExec()