mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-24 08:39:59 -05:00
log exception when thread dies (seems to be dying silently sometimes)
This commit is contained in:
parent
839bf6f4ae
commit
6cda4739b8
@ -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…
x
Reference in New Issue
Block a user