Skip to content

Commit

Permalink
Log when a forked worker encounters an exception.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lecocq committed Nov 3, 2016
1 parent 966ed80 commit 9134513
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qless/workers/forking.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def run(self):
os.chdir(sandbox)
try:
self.spawn(resume=resume[index], sandbox=sandbox).run()
except:
logger.exception('Exception in spawned worker')
finally:
os._exit(0)

Expand All @@ -100,6 +102,8 @@ def run(self):
os.chdir(sandbox)
try:
self.spawn(sandbox=sandbox).run()
except:
logger.exception('Exception in spawned worker')
finally:
os._exit(0)
finally:
Expand Down

0 comments on commit 9134513

Please sign in to comment.