mirror of
https://github.com/internetarchive/warcprox.git
synced 2025-01-18 13:22:09 +01:00
log stack trace in case batch postprocessor raises
exception somehow
This commit is contained in:
parent
e8cb3afa71
commit
e73cbcb6b3
@ -122,14 +122,19 @@ class BasePostfetchProcessor(threading.Thread):
|
|||||||
self.profiler = None
|
self.profiler = None
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
if self.options.profile:
|
try:
|
||||||
import cProfile
|
if self.options.profile:
|
||||||
self.profiler = cProfile.Profile()
|
import cProfile
|
||||||
self.profiler.enable()
|
self.profiler = cProfile.Profile()
|
||||||
self._run()
|
self.profiler.enable()
|
||||||
self.profiler.disable()
|
self._run()
|
||||||
else:
|
self.profiler.disable()
|
||||||
self._run()
|
else:
|
||||||
|
self._run()
|
||||||
|
except:
|
||||||
|
self.logger.critical(
|
||||||
|
'%s dying due to uncaught exception',
|
||||||
|
self.name, exc_info=True)
|
||||||
|
|
||||||
def _get_process_put(self):
|
def _get_process_put(self):
|
||||||
'''
|
'''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user