Skip to content

Commit

Permalink
Make the slurm timeout configurable
Browse files Browse the repository at this point in the history
And increase the default timeout to two hours.
  • Loading branch information
JamesWrigley committed Jul 5, 2023
1 parent 6a97fd0 commit c082f3e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions damnit/backend/extract_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,15 @@ def proposal(self):
return self._proposal

def slurm_options(self):
opts = ["--time", self.db.metameta.get("slurm_time", "02:00:00")]

if reservation := self.db.metameta.get('slurm_reservation', ''):
return ['--reservation', reservation]
partition = self.db.metameta.get('slurm_partition', '') or default_slurm_partition()
return ['--partition', partition]
opts.extend(['--reservation', reservation])
else:
partition = self.db.metameta.get('slurm_partition', '') or default_slurm_partition()
opts.extend(['--partition', partition])

return opts

def extract_and_ingest(self, proposal, run, cluster=False,
run_data=RunData.ALL, match=()):
Expand Down

0 comments on commit c082f3e

Please sign in to comment.