1 parent a497e97 commit be2d143Copy full SHA for be2d143
1 file changed
src/workflows/services/common_service.py
@@ -456,14 +456,14 @@ def start(self, **kwargs):
456
457
try:
458
task = self.__queue.get(True, self._idle_time or 2)
459
- run_idle_task = False
460
except queue.Empty:
461
- run_idle_task = True
+ task = None
462
463
if self.transport and not self.transport.is_connected():
464
raise workflows.Disconnected("Connection lost")
465
466
- if run_idle_task:
+ if task is None:
+ # Run the idle task
467
if self._idle_time:
468
# run this outside the 'except' to avoid exception chaining
469
self.__update_service_status(self.SERVICE_STATUS_TIMER)
0 commit comments