##// END OF EJS Templates
tasks: when CELERY_EAGER_PROPAGATES_EXCEPTIONS is true do not retry tasks
ergo -
Show More
@@ -84,6 +84,8 b' def test_retry_exception_task():'
84 log.warning('test retry celery log', extra={'location': 'celery'})
84 log.warning('test retry celery log', extra={'location': 'celery'})
85 raise Exception('Celery exception test')
85 raise Exception('Celery exception test')
86 except Exception as exc:
86 except Exception as exc:
87 if celery.conf["CELERY_EAGER_PROPAGATES_EXCEPTIONS"]:
88 raise
87 test_retry_exception_task.retry(exc=exc)
89 test_retry_exception_task.retry(exc=exc)
88
90
89
91
@@ -216,6 +218,8 b' def add_reports(resource_id, request_params, dataset, **kwargs):'
216 return True
218 return True
217 except Exception as exc:
219 except Exception as exc:
218 print_traceback(log)
220 print_traceback(log)
221 if celery.conf["CELERY_EAGER_PROPAGATES_EXCEPTIONS"]:
222 raise
219 add_reports.retry(exc=exc)
223 add_reports.retry(exc=exc)
220
224
221
225
@@ -337,6 +341,8 b' def add_logs(resource_id, request_params, dataset, **kwargs):'
337 return True
341 return True
338 except Exception as exc:
342 except Exception as exc:
339 print_traceback(log)
343 print_traceback(log)
344 if celery.conf["CELERY_EAGER_PROPAGATES_EXCEPTIONS"]:
345 raise
340 add_logs.retry(exc=exc)
346 add_logs.retry(exc=exc)
341
347
342
348
@@ -399,6 +405,8 b' def add_metrics(resource_id, request_params, dataset, proto_version):'
399 return True
405 return True
400 except Exception as exc:
406 except Exception as exc:
401 print_traceback(log)
407 print_traceback(log)
408 if celery.conf["CELERY_EAGER_PROPAGATES_EXCEPTIONS"]:
409 raise
402 add_metrics.retry(exc=exc)
410 add_metrics.retry(exc=exc)
403
411
404
412
@@ -538,6 +546,8 b' def update_tag_counter(tag_name, tag_value, count):'
538 return True
546 return True
539 except Exception as exc:
547 except Exception as exc:
540 print_traceback(log)
548 print_traceback(log)
549 if celery.conf["CELERY_EAGER_PROPAGATES_EXCEPTIONS"]:
550 raise
541 update_tag_counter.retry(exc=exc)
551 update_tag_counter.retry(exc=exc)
542
552
543
553
General Comments 3
Under Review
author

Auto status change to "Under Review"

You need to be logged in to leave comments. Login now