diff options
-rw-r--r-- | ick2/controllerapi.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ick2/controllerapi.py b/ick2/controllerapi.py index 1fea9a0..a7d5fb5 100644 --- a/ick2/controllerapi.py +++ b/ick2/controllerapi.py @@ -380,15 +380,25 @@ class WorkAPI(APIbase): project, pipeline = self._get_pipeline( update['project'], update['pipeline']) + ick2.log.log( + 'trace', + msg_text='xxx update_work', + update=update, + project=project, + pipeline=pipeline, + doing=doing) + if update.get('exit_code') == 0: + ick2.log.log('trace', msg_texg='xxx finishing step') index = doing['step_index'] + 1 actions = pipeline['actions'] if index >= len(actions): - self._finish_pipeline(project, pipeline) + pipeline['status'] = 'idle' doing = {} else: doing['step_index'] = index doing['step'] = actions[index] + self._update_project(project) worker_state = { 'worker': update['worker'], @@ -414,10 +424,6 @@ class WorkAPI(APIbase): return p, pl raise ick2.NotFound() - def _finish_pipeline(self, project, pipeline): - pipeline['status'] = 'idle' - self._update_project(project) - def create(self, *args, **kwargs): # pragma: no cover pass |