This document describes Celery 2.4. For development docs, go here.

celery.worker.mediator

celery.worker.mediator

The mediator is an internal thread that moves tasks from an internal Queue to the worker pool.

This is only used if rate limits are enabled, as it moves messages from the rate limited queue (which holds tasks that are allowed to be processed) to the pool. Disabling rate limits will also disable this machinery, and can improve performance.

copyright:
  1. 2009 - 2011 by Ask Solem.
license:

BSD, see LICENSE for more details.

class celery.worker.mediator.Mediator(ready_queue, callback, logger=None, app=None)
callback = None

Callback called when a task is obtained.

move()
ready_queue = None

The task queue, a Queue instance.

run()

Move tasks until stop() is called.

stop()

Gracefully shutdown the thread.