summaryrefslogtreecommitdiff
path: root/pkg/worker
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-06-25 22:07:52 +0300
committerValery Piashchynski <[email protected]>2021-06-25 22:07:52 +0300
commitae58af3ca1d37cb61f106146e4bf9bd1d033e8b3 (patch)
tree8d14a41607080298e1f0441a9ad620aee17da39e /pkg/worker
parente9249c7896331bab97a18a7ee0db17803fdd31fb (diff)
- Fix bug with an exec_ttl reallocation issue
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/worker')
-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()