Skip to content
This repository has been archived by the owner on Feb 12, 2020. It is now read-only.

Commit

Permalink
Avoid thread to stop if there is an error in processNext
Browse files Browse the repository at this point in the history
  • Loading branch information
jfroche committed May 16, 2011
1 parent d98fa21 commit 7020cb2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Changelog
0.1-alpha-4 (unreleased)
------------------------

- Nothing changed yet.
- Avoid thread to stop if there is an error in processNext


0.1-alpha-3 (2010-11-19)
Expand Down
6 changes: 5 additions & 1 deletion src/z3c/taskqueue/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ def processNext(self, jobid=None):

def __call__(self):
while self.running:
result = self.processNext()
try:
result = self.processNext()
except Exception, error:
log.exception(error)
result = None
# If there are no jobs available, sleep a little bit and then
# check again.
if not result:
Expand Down

0 comments on commit 7020cb2

Please sign in to comment.