From d4b9109b72efa34bf53a109d4affb1c6c3b5d9d6 Mon Sep 17 00:00:00 2001 From: Michal Babinski Date: Wed, 7 Feb 2024 08:32:55 -0800 Subject: [PATCH] fixed filter for unclaimed jobs --- nmdc_automation/workflow_automation/watch_nmdc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nmdc_automation/workflow_automation/watch_nmdc.py b/nmdc_automation/workflow_automation/watch_nmdc.py index 98797918..1f950dee 100644 --- a/nmdc_automation/workflow_automation/watch_nmdc.py +++ b/nmdc_automation/workflow_automation/watch_nmdc.py @@ -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")