Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(7)  |  Derive(0)  |  Import(6)

        def trace_task(task, uuid, args, kwargs, request={}, **opts):
    try:
        if task.__trace__ is None:
            task.__trace__ = build_tracer(task.name, task, **opts)
        return task.__trace__(uuid, args, kwargs, request)[0]
    except Exception as exc:
        return report_internal_error(task, exc)
        


src/c/e/celery-3.1.11/celery/worker/job.py   celery(Download)
 
from celery import signals
from celery.app.trace import trace_task, trace_task_ret
from celery.exceptions import (
    Ignore, TaskRevokedError, InvalidTaskError,
                        'hostname': self.hostname, 'is_eager': False,
                        'delivery_info': self.delivery_info})
        retval = trace_task(self.task, self.id, self.args, kwargs, request,
                            hostname=self.hostname, loader=self.app.loader,
                            app=self.app)

src/c/e/celery-HEAD/celery/worker/request.py   celery(Download)
 
from celery import signals
from celery.app.trace import trace_task, trace_task_ret
from celery.exceptions import (
    Ignore, TaskRevokedError, InvalidTaskError,
                        'hostname': self.hostname, 'is_eager': False,
                        'args': args, 'kwargs': kwargs})
        retval = trace_task(self.task, self.id, args, kwargs, request,
                            hostname=self.hostname, loader=self.app.loader,
                            app=self.app)[0]

src/c/e/celery-3.1.11/celery/tests/worker/test_request.py   celery(Download)
 
from celery import states
from celery.app.trace import (
    trace_task,
    _trace_task_ret,
    task.__trace__ = None  # rebuild
    return trace_task(
        task, task_id, args, kwargs, request=request, eager=False, app=app,
    )
 
        with self.assertWarnsRegex(RuntimeWarning,
                                   r'Exception raised outside'):
            res = trace_task(raising, uuid(), [], {}, app=self.app)
            self.assertIsInstance(res, ExceptionInfo)
 

src/c/e/celery-HEAD/celery/tests/worker/test_request.py   celery(Download)
 
from celery import states
from celery.app.trace import (
    trace_task,
    _trace_task_ret,
        with self.assertWarnsRegex(RuntimeWarning,
                                   r'Exception raised outside'):
            res = trace_task(raising, uuid(), [], {}, app=self.app)[0]
            self.assertIsInstance(res, ExceptionInfo)
 

src/c/e/celery-3.1.11/celery/tests/tasks/test_trace.py   celery(Download)
from celery import states
from celery.exceptions import Ignore, Retry
from celery.app.trace import (
    TraceInfo,
    eager_trace_task,
            pass
 
        trace_task(xtask, 'uuid', (), {})
        self.assertTrue(report_internal_error.call_count)
        self.assertIs(xtask.__trace__, tracer)

src/c/e/celery-HEAD/celery/tests/tasks/test_trace.py   celery(Download)
from celery import states
from celery.exceptions import Ignore, Retry
from celery.app.trace import (
    TraceInfo,
    build_tracer,
            pass
 
        trace_task(xtask, 'uuid', (), {})
        self.assertTrue(report_internal_error.call_count)
        self.assertIs(xtask.__trace__, tracer)