MCPcopy Create free account
hub / github.com/celery/celery / build_chain_inside_task

Function build_chain_inside_task

t/integration/tasks.py:407–423  ·  view source on GitHub ↗

Task to build a chain. This task builds a chain and returns the chain's AsyncResult to verify that Asyncresults are correctly converted into serializable objects

(self)

Source from the content-addressed store, hash-verified

405
406@shared_task(bind=True)
407def build_chain_inside_task(self):
408 """Task to build a chain.
409
410 This task builds a chain and returns the chain's AsyncResult
411 to verify that Asyncresults are correctly converted into
412 serializable objects"""
413 test_chain = (
414 add.s(1, 1) |
415 add.s(2) |
416 group(
417 add.s(3),
418 add.s(4)
419 ) |
420 add.s(5)
421 )
422 result = test_chain()
423 return result
424
425
426class ExpectedException(Exception):

Callers

nothing calls this directly

Calls 3

groupClass · 0.90
test_chainClass · 0.70
sMethod · 0.45

Tested by

no test coverage detected