Esempio n. 1
0
def nofail(*args, **kwargs):
    """Complete the task if it is re-run without failing."""
    task_id = kwargs.pop('task_id')
    progress = kwargs.pop('progress')
    if progress is None:
        task.update(task_id, 'one')
        return 'one'
    task.finish(task_id)
    return (args, kwargs)
Esempio n. 2
0
def nofail(*args, **kwargs):
    """Complete the task if it is re-run without failing."""
    task_id = kwargs.pop('task_id')
    progress = kwargs.pop('progress')
    if progress is None:
        task.update(task_id, 'one')
        return 'one'
    task.finish(task_id)
    return (args, kwargs)
Esempio n. 3
0
def manual_retry(*args, **kwargs):
    """Complete the task if it is re-run."""
    task_id = kwargs.pop('task_id')
    progress = kwargs.pop('progress')
    if progress is None:
        task.fail(task_id, 'fail')
        return 'fail'
    task.finish(task_id)
    return (args, kwargs)
Esempio n. 4
0
def manual_retry(*args, **kwargs):
    """Complete the task if it is re-run."""
    task_id = kwargs.pop('task_id')
    progress = kwargs.pop('progress')
    if progress is None:
        task.fail(task_id, 'fail')
        return 'fail'
    task.finish(task_id)
    return (args, kwargs)