Skip to content

Commit

Permalink
feat(dask): check if dask is required for the workflow (reanahub#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alputer committed Aug 28, 2024
1 parent 67a7254 commit 3e8e475
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions reana_db/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,12 @@ def workspace_has_pending_retention_rules(self):
)
return pending_rules.first() is not None

def requires_dask(self):
"""Check whether Dask is necessary to run the workflow."""
return (
self.reana_specification["workflow"].get("resources", {}).get("dask", False)
)

def get_priority(self, cluster_memory):
"""Workflow priority when scheduling it.
Expand Down

0 comments on commit 3e8e475

Please sign in to comment.