Changed logging in worker thread
This commit is contained in:
parent
d9b22fd513
commit
76c3ade394
1 changed files with 3 additions and 5 deletions
|
@ -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 a new issue