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
|
||||
|
||||
def run(self):
|
||||
if self.options.profile:
|
||||
import cProfile
|
||||
self.profiler = cProfile.Profile()
|
||||
self.profiler.enable()
|
||||
self._run()
|
||||
self.profiler.disable()
|
||||
else:
|
||||
self._run()
|
||||
try:
|
||||
if self.options.profile:
|
||||
import cProfile
|
||||
self.profiler = cProfile.Profile()
|
||||
self.profiler.enable()
|
||||
self._run()
|
||||
self.profiler.disable()
|
||||
else:
|
||||
self._run()
|
||||
except:
|
||||
self.logger.critical(
|
||||
'%s dying due to uncaught exception',
|
||||
self.name, exc_info=True)
|
||||
|
||||
def _get_process_put(self):
|
||||
'''
|
||||
|
Loading…
x
Reference in New Issue
Block a user