3
0

Prevent workflow worker from stopping in case of delayed steps

This commit is contained in:
Tomaž Jerman
2022-02-23 14:23:24 +01:00
parent ab805f0075
commit 4fd0ddfaaf

View File

@@ -440,6 +440,12 @@ func (s *Session) worker(ctx context.Context) {
s.log.Debug("pulled state from queue", zap.Uint64("stateID", st.stateId))
if st.step == nil {
// We should not terminate if the session contains any delayed or prompted steps.
status := s.Status()
if status == SessionPrompted || status == SessionDelayed {
break
}
s.log.Debug("done, setting results and stopping the worker")
func() {