mirror of
https://github.com/janeczku/calibre-web
synced 2024-11-24 18:47:23 +00:00
Changed logging in worker thread
This commit is contained in:
parent
d9b22fd513
commit
76c3ade394
@ -161,7 +161,8 @@ class CalibreTask:
|
||||
self.run(*args)
|
||||
except Exception as e:
|
||||
self._handleError(str(e))
|
||||
log.exception(e)
|
||||
if logger.is_debug_enabled():
|
||||
log.exception(e)
|
||||
|
||||
self.end_time = datetime.now()
|
||||
|
||||
@ -210,10 +211,7 @@ class CalibreTask:
|
||||
self._progress = x
|
||||
|
||||
def _handleError(self, error_message):
|
||||
if logger.is_debug_enabled():
|
||||
log.exception(error_message)
|
||||
else:
|
||||
log.error(error_message)
|
||||
log.error(error_message)
|
||||
self.stat = STAT_FAIL
|
||||
self.progress = 1
|
||||
self.error = error_message
|
||||
|
Loading…
Reference in New Issue
Block a user