celery.app.trace

    class celery.app.trace.TraceInfo(state, retval=None)[源代码]

    • handle_error_state(task, eager=False)

    • handle_retry(task, store_errors=True)[源代码]

    • state None

    celery.app.trace.build_tracer(name, task, loader=None, hostname=None, store_errors=True, Info=<class ‘celery.app.trace.TraceInfo’>, eager=False, propagate=False, app=None, IGNORE_STATES=frozenset([‘IGNORED’, ‘RETRY’, ‘REJECTED’]))

    Return a function that traces task execution; catches all exceptions and updates result backend with the state and result

    If the call was successful, it saves the result to the task result backend, and sets the task status to “SUCCESS”.

    If the call results in an exception, it saves the exception as the task result, and sets the task state to “FAILURE”.

    Return a function that takes the following arguments:

    celery.app.trace.trace_task(task, uuid, args, kwargs, request={}, \*opts*)[源代码]

    celery.app.trace.eager_trace_task(task, uuid, args, kwargs, request=None, \*opts*)

    celery.app.trace.setup_worker_optimizations(app)[源代码]