Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Claim jobs fix #52

Merged
merged 2 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nmdc_automation/api/nmdcapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def bump_time(self, obj):
return resp.json()

@refresh_token
def list_jobs(self, filt=None, max=20):
def list_jobs(self, filt=None, max=100):
url = "%sjobs?max_page_size=%s" % (self._base_url, max)
d = {}
if filt:
Expand Down
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
Loading