예제 #1
0
def retry_and_report_killed(func, account_id, folder_name=None, logger=None,
                            retry_classes=None, fail_classes=None):
    exc_callback = lambda: log_uncaught_errors(logger)
    fail_callback = lambda: report_killed(account_id, folder_name)
    return retry(func, exc_callback=exc_callback,
                 fail_callback=fail_callback, retry_classes=retry_classes,
                 fail_classes=fail_classes)()
예제 #2
0
def retry_and_report_killed(func, account_id, folder_name=None, logger=None,
                            retry_classes=None, fail_classes=None):
    exc_callback = lambda: log_uncaught_errors(logger=logger,
                                               account_id=account_id)
    fail_callback = lambda: report_killed(account_id, folder_name)
    return retry(func, exc_callback=exc_callback,
                 fail_callback=fail_callback, retry_classes=retry_classes,
                 fail_classes=fail_classes)()
예제 #3
0
def retry_and_report_killed(func, account_id, folder_name=None, logger=None,
                            retry_classes=None, fail_classes=None,
                            exc_callback=None, fail_callback=None,
                            **reset_params):
    if not exc_callback:
        exc_callback = lambda: log_uncaught_errors(logger=logger,
                                                   account_id=account_id)
    if not fail_callback:
        fail_callback = lambda: report_killed(account_id, folder_name)

    return retry(func, exc_callback=exc_callback, fail_callback=fail_callback,
                 retry_classes=retry_classes, fail_classes=fail_classes,
                 **reset_params)()