mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-07-12 01:29:36 -04:00
log exception when thread dies (seems to be dying silently sometimes)
This commit is contained in:
parent
839bf6f4ae
commit
6cda4739b8
1 changed files with 25 additions and 22 deletions
|
@ -131,6 +131,7 @@ class BrozzlerWorker:
|
|||
self._browser_pool.release(browser)
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
latest_state = None
|
||||
while not self._shutdown_requested.is_set():
|
||||
try:
|
||||
|
@ -154,6 +155,8 @@ class BrozzlerWorker:
|
|||
self.logger.info("no unclaimed sites to browse")
|
||||
latest_state = "no-unclaimed-sites"
|
||||
time.sleep(0.5)
|
||||
except:
|
||||
self.logger.critical("thread exiting due to unexpected exception", exc_info=True)
|
||||
|
||||
def start(self):
|
||||
th = threading.Thread(target=self.run, name="BrozzlerWorker")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue