more logging, reset cancel imort

This commit is contained in:
j 2016-01-23 18:07:25 +05:30
commit cded8b586a
4 changed files with 25 additions and 2 deletions

View file

@ -29,6 +29,7 @@ class Tasks(Thread):
if m:
try:
action, data = m
logger.debug('run task %s', action)
if action == 'ping':
trigger_event('pong', data)
elif action == 'import':
@ -47,6 +48,7 @@ class Tasks(Thread):
sync_metadata(*data)
else:
trigger_event('error', {'error': 'unknown action'})
logger.debug('finished task %s', action)
except:
logger.debug('task failed', exc_info=1)
self.q.task_done()