##// END OF EJS Templates
celery: improve logging of failed async execution.
marcink -
r2412:83caad73 default
parent child Browse files
Show More
@@ -42,6 +42,7 b' class ResultWrapper(object):'
42
42
43
43
44 def run_task(task, *args, **kwargs):
44 def run_task(task, *args, **kwargs):
45 log.debug('Got task `%s` for execution', task)
45 if rhodecode.CELERY_ENABLED:
46 if rhodecode.CELERY_ENABLED:
46 celery_is_up = False
47 celery_is_up = False
47 try:
48 try:
@@ -52,11 +53,11 b' def run_task(task, *args, **kwargs):'
52
53
53 except socket.error as e:
54 except socket.error as e:
54 if isinstance(e, IOError) and e.errno == 111:
55 if isinstance(e, IOError) and e.errno == 111:
55 log.error('Unable to connect to celeryd. Sync execution')
56 log.error('Unable to connect to celeryd `%s`. Sync execution', e)
56 else:
57 else:
57 log.exception("Exception while connecting to celeryd.")
58 log.exception("Exception while connecting to celeryd.")
58 except KeyError as e:
59 except KeyError as e:
59 log.error('Unable to connect to celeryd. Sync execution')
60 log.error('Unable to connect to celeryd `%s`. Sync execution', e)
60 except Exception as e:
61 except Exception as e:
61 log.exception(
62 log.exception(
62 "Exception while trying to run task asynchronous. "
63 "Exception while trying to run task asynchronous. "
General Comments 0
You need to be logged in to leave comments. Login now