Skip to content

Commit

Permalink
fix issue when next_task_nodes is None (#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg authored Mar 30, 2020
1 parent 9725800 commit ab6862b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions services/sidecar/src/simcore_service_sidecar/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@

@app.task(name="comp.task", bind=True)
def pipeline(self, user_id: str, project_id: str, node_id: str = None):
next_task_nodes = []
try:
next_task_nodes = wrap_async_call(
run_sidecar(self.request.id, user_id, project_id, node_id)
)
self.update_state(state=states.SUCCESS)

if next_task_nodes:
for _node_id in next_task_nodes:
_task = app.send_task(
"comp.task", args=(user_id, project_id, _node_id), kwargs={}
)
except Exception: # pylint: disable=broad-except
self.update_state(state=states.FAILURE)
log.exception("Uncaught exception")

for _node_id in next_task_nodes:
_task = app.send_task(
"comp.task", args=(user_id, project_id, _node_id), kwargs={}
)
log.exception("Uncaught exception")


__all__ = ["rabbit_config", "app"]

0 comments on commit ab6862b

Please sign in to comment.