magpie.task.worker

Module Contents

Functions

start_worker

Start a Celery worker cluster as a subprocess of this one.

stop_worker

Stop a running Celery worker cluster.

Data

worker_pid

PID of the worker cluster process

API

magpie.task.worker.worker_pid

None

PID of the worker cluster process

magpie.task.worker.start_worker()[source]

Start a Celery worker cluster as a subprocess of this one.

magpie.task.worker.stop_worker(now=False)[source]

Stop a running Celery worker cluster.

Parameters:

now – whether to perform a cold shutdown (kill all the workers instantly) or a warm shutdown (wait until all the workers exit)