Skip to content

Commit

Permalink
fixed filter for unclaimed jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Babinski committed Feb 7, 2024
1 parent 540a59a commit d4b9109
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nmdc_automation/workflow_automation/watch_nmdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ def refresh_remote_jobs(self):
"""
Return a filtered list of nmdc jobs.
"""
filt = {"workflow.id": {"$in": self._ALLOWED}}
filt = {
"workflow.id": {"$in": self._ALLOWED},
"claims": {"$size": 0}
}
logging.debug("Looking for jobs")
jobs = self.runtime_api.list_jobs(filt=filt)
logging.debug(f"Found {len(jobs)} jobs")
Expand Down

0 comments on commit d4b9109

Please sign in to comment.