Append to job_log

This commit is contained in:
Dominik Moritz Roth 2023-07-12 11:38:58 +02:00
parent 10b479d8d0
commit 72a7b9df25

View File

@ -184,8 +184,8 @@ class Slate():
job = pyslurm.JobSubmitDescription(name=s_name, script=script, array=array, **slurmC)
job_id = job.submit()
print(f'[i] Job submitted to slurm with id {job_id}')
with open('job_hist.log', 'w') as f:
f.write(f'{filename}:{name} submitted to slurm with ids {job_id}_0-{num_jobs} on [git:{sha}] at {datetime.datetime.now()}')
with open('job_hist.log', 'a') as f:
f.write(f'{filename}:{name} submitted to slurm with ids {job_id}_0-{num_jobs} on [git:{sha}] at {datetime.datetime.now()}\n')
def _fork_processes(self, config, rep_ids):
schedC = self.consume(config, 'scheduler')