mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
continue after unexpected error
This commit is contained in:
parent
fd847f01cd
commit
3363b2ec95
@ -39,6 +39,7 @@ class WarcWriterThread(threading.Thread):
|
||||
cProfile.runctx('self._run()', globals(), locals(), sort='cumulative')
|
||||
|
||||
def _run(self):
|
||||
while not self.stop.is_set():
|
||||
try:
|
||||
self.setName('WarcWriterThread(tid={})'.format(warcprox.gettid()))
|
||||
while True:
|
||||
@ -63,7 +64,8 @@ class WarcWriterThread(threading.Thread):
|
||||
self.logger.info('WarcWriterThread shutting down')
|
||||
self.writer_pool.close_writers()
|
||||
except:
|
||||
self.logger.critical("WarcWriterThread shutting down after unexpected error", exc_info=True)
|
||||
self.logger.critical("WarcWriterThread will try to continue after unexpected error", exc_info=True)
|
||||
time.sleep(0.5)
|
||||
|
||||
# closest thing we have to heritrix crawl log at the moment
|
||||
def _log(self, recorded_url, records):
|
||||
|
Loading…
x
Reference in New Issue
Block a user