Skip to content

Commit

Permalink
Fixed state query in jobcontroller.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwaroquiers committed Aug 21, 2023
1 parent 0bf90b5 commit fe03b05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/jobflow_remote/jobs/jobcontroller.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def _build_query_wf(
not_in_states = list(Firework.STATE_RANKS.keys())
not_in_states.remove("WAITING")
query["fws.state"] = {"$nin": not_in_states}
if state == FlowState.PAUSED:
elif state == FlowState.PAUSED:
not_in_states = list(Firework.STATE_RANKS.keys())
not_in_states.remove("PAUSED")
query["fws.state"] = {"$nin": not_in_states}
Expand All @@ -162,6 +162,8 @@ def _build_query_wf(
}
},
]
else:
raise RuntimeError("Unknown flow state.")

# at variance with Firework doc, the dates in the Workflow are Date objects
if start_date:
Expand Down

0 comments on commit fe03b05

Please sign in to comment.