Преглед изворни кода

Merge pull request #106 from aznashwan/error-tasks-hanging

Prevent execution status locking from on_error tasks.
Nashwan Azhari пре 6 година
родитељ
комит
b22dfe51f5
1 измењених фајлова са 4 додато и 2 уклоњено
  1. 4 2
      coriolis/conductor/rpc/server.py

+ 4 - 2
coriolis/conductor/rpc/server.py

@@ -926,9 +926,11 @@ class ConductorServerEndpoint(object):
         has_error_tasks = False
         has_error_tasks = False
         has_running_tasks = False
         has_running_tasks = False
         for task in execution.tasks:
         for task in execution.tasks:
-            if task.on_error:
+            if task.on_error and task.status in (
+                    constants.TASK_STATUS_RUNNING,
+                    constants.TASK_STATUS_PENDING):
                 # NOTE: always allow on_error tasks to execute
                 # NOTE: always allow on_error tasks to execute
-                # as they may do required cleanup:
+                # as they may be required for cleanup:
                 has_error_tasks = True
                 has_error_tasks = True
                 continue
                 continue