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