Skip to content

Commit

Permalink
fix(progress): handle stopped jobs (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonadoni committed Jan 25, 2024
1 parent 21957fe commit 6bed7bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reana_workflow_engine_cwl/cwl_reana.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,13 @@ def poll(self):

def is_done(self, operation):
"""Check if operation is done."""
terminal_states = ["finished", "failed"]
terminal_states = ["finished", "failed", "stopped"]

Check warning on line 487 in reana_workflow_engine_cwl/cwl_reana.py

View check run for this annotation

Codecov / codecov/patch

reana_workflow_engine_cwl/cwl_reana.py#L487

Added line #L487 was not covered by tests
if operation["status"] in terminal_states:
log.info(
f"[job {self.name}] FINAL JOB STATE: "
f"{ operation['status']} ------------------"
)
if operation["status"] != "failed":
if operation["status"] == "finished":

Check warning on line 493 in reana_workflow_engine_cwl/cwl_reana.py

View check run for this annotation

Codecov / codecov/patch

reana_workflow_engine_cwl/cwl_reana.py#L493

Added line #L493 was not covered by tests
self.rcode = 0
# here we could publish that the job with id: self.task_id
# finished or failed.
Expand Down

0 comments on commit 6bed7bb

Please sign in to comment.