magpie.task.queue

Module Contents

Functions

ping

Ping the workers and return their responses.

task_sent_handler

task_prerun_handler

task_postrun_handler

run_task

Run a task with an optional success callback.

Data

app

Main Celery app instance

API

magpie.task.queue.app

‘Celery(…)’

Main Celery app instance

magpie.task.queue.ping(timeout=0)[source]

Ping the workers and return their responses.

Parameters:

timeout – seconds to wait for a reply. Useful when called just after starting a cluster

Returns:

a list of workers/responses available

magpie.task.queue.task_sent_handler(sender=None, headers=None, body=None, **kwargs)[source]
magpie.task.queue.task_prerun_handler(sender=None, task_id=None, task=None, *args, **kwargs)[source]
magpie.task.queue.task_postrun_handler(*args, **kwargs)[source]
magpie.task.queue.run_task(task, *args, callback=None, **kwargs)[source]

Run a task with an optional success callback.

The callback will receive the result of the task as its only argument.