Skip to content

Commit

Permalink
Update o2_dpg_workflow_runner.py
Browse files Browse the repository at this point in the history
protect setting nice value against exception
  • Loading branch information
sawenzel authored Mar 2, 2021
1 parent 2e31c7c commit 6b1f33f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions MC/bin/o2_dpg_workflow_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,11 @@ def submit(self, tid, nice=0):
taskenv.update(self.workflowspec['stages'][tid]['env'])

p = psutil.Popen(['/bin/bash','-c',c], cwd=workdir, env=taskenv)
p.nice(nice)
self.nicevalues[tid]=nice
try:
p.nice(nice)
self.nicevalues[tid]=nice
except (psutil.NoSuchProcess, psutil.AccessDenied):
self.nicevalues[tid]=0
return p

def ok_to_submit(self, tid, backfill=False):
Expand Down

0 comments on commit 6b1f33f

Please sign in to comment.