Similarly to what was happening in reanahub/reana-ui#386, when running reana-client status --include-duration for a stopped workflow, the displayed duration is not the time between the moment in which the run was started and the moment in which the run was stopped, but the total time passed from the beginning of the run until the current moment.
❯ reana-client status -w recast --include-duration --json | jq '.[0].status'
"stopped"
❯ reana-client status -w recast --include-duration --json | jq '.[0].duration'
2598
# After a few seconds...
❯ reana-client status -w recast --include-duration --json | jq '.[0].duration'
2604
Similarly to what was happening in reanahub/reana-ui#386, when running
reana-client status --include-duration
for a stopped workflow, the displayed duration is not the time between the moment in which the run was started and the moment in which the run was stopped, but the total time passed from the beginning of the run until the current moment.This is very likely because in
reana_client.utils.get_workflow_duration
we only look atrun_finished_at
, but not atrun_stopped_at
.