diff options
author | Valery Piashchynski <[email protected]> | 2021-06-25 22:07:52 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-06-25 22:07:52 +0300 |
commit | ae58af3ca1d37cb61f106146e4bf9bd1d033e8b3 (patch) | |
tree | 8d14a41607080298e1f0441a9ad620aee17da39e /pkg/worker | |
parent | e9249c7896331bab97a18a7ee0db17803fdd31fb (diff) |
- Fix bug with an exec_ttl reallocation issue
Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'pkg/worker')
-rwxr-xr-x | pkg/worker/sync_worker.go | 9 |
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() |