Skip to content

Commit df73b72

Browse files
committed
do not raise in case of long poll timeout
1 parent 66b25b1 commit df73b72

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cadence/decision_loop.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -901,6 +901,10 @@ def poll(self) -> Optional[PollForDecisionTaskResponse]:
901901
polling_end = datetime.datetime.now()
902902
logger.debug("PollForDecisionTask: %dms", (polling_end - polling_start).total_seconds() * 1000)
903903
except TChannelException as ex:
904+
if f'{ex}' == "timeout":
905+
logger.warning("PollForDecisionTask error: %s", ex)
906+
logger.warning(f"LongPoll timeout -- no tasks available to execute -- exception message: {ex}")
907+
return None
904908
logger.error("PollForDecisionTask error: %s", ex)
905909
logger.info(f"raising exception PollForDecisionTask {ex}")
906910
raise

0 commit comments

Comments
 (0)