This document describes an older version of Celery (2.5). For the latest stable version please 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 - 2012 by Ask Solem.
license:

BSD, see LICENSE for more details.

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

Callback called when a task is obtained.

move()
ready_queue = None

The task queue, a Queue instance.

class celery.worker.mediator.WorkerComponent(w, **kwargs)
create(w)
include_if(w)
name = 'mediator'
namespace = 'worker'
requires = ('pool', 'queues')

Previous topic

celery.worker.job

Next topic

celery.worker.buckets

This Page