Module ImportFrom alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Assign NameStore TupleLoad Str Str Str Str Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Yield Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr Str BoolOpOr NameLoad Str Assign NameStore ListLoad Assign NameStore IfExp NameLoad ListLoad NameLoad NameLoad Assign NameStore BinOpDiv AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Assign NameStore Yield NameLoad For TupleStore NameStore NameStore Call NameLoad NameLoad body If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Continue For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If CompareIsNot NameLoad NameLoad body Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign SubscriptStore NameLoad Index SubscriptLoad AttributeLoad NameLoad attr Index NameLoad NameLoad Assign SubscriptStore NameLoad Index Str Call AttributeLoad NameLoad attr decorator_list NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Return BoolOpAnd NameLoad CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str For NameStore NameLoad body TryExcept body Return Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Str Str handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad NameLoad attr Str NameLoad Return Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad ListLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body For NameStore Call AttributeLoad NameLoad attr Str ListLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Return NameLoad decorator_list NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword ListLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword Str decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Dict Str NameLoad keyword ListLoad NameLoad keyword NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword BinOpMod Str NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword NameLoad keyword ListLoad NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword BinOpMod Str TupleLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr keyword NameLoad keyword NameLoad keyword ListLoad NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword BinOpMod Str TupleLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Dict Str Str NameLoad NameLoad keyword ListLoad NameLoad keyword NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword BinOpMod Str TupleLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Dict Str NameLoad keyword ListLoad NameLoad keyword NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad Index Str orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Dict Str NameLoad keyword ListLoad NameLoad keyword NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad Index Str orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword BinOpMod Str NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad If CompareNotIn NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Assign NameStore IfExp CompareIsNot NameLoad NameLoad ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad Index Str orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareNotIn NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Raise Call AttributeLoad NameLoad attr Num BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore IfExp CompareIsNot NameLoad NameLoad ListLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad keyword NameLoad keyword NameLoad If BoolOpAnd NameLoad CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad keyword SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index NameLoad Index Str orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list AttributeLoad NameLoad attr decorator_list
N/A __future__ absolute_import N/A time N/A logging N/A collections tornado web tornado gen views BaseHandler N/A logger N/A N/A logging getLogger __name__ ControlHandler N/A BaseHandler N/A N/A INSPECT_METHODS N/A stats active_queues registered scheduled active reserved revoked conf N/A worker_cache N/A N/A collections defaultdict dict update_cache N/A N/A self workername N/A None N/A N/A N/A N/A N/A self update_workers workername workername app N/A self application N/A N/A gen coroutine update_workers N/A N/A cls app workername N/A None N/A N/A N/A N/A logger debug Updating %s worker's cache... N/A workername all N/A futures N/A N/A destination N/A workername N/A workername None N/A timeout N/A N/A N/A app options inspect_timeout 1000.0 N/A inspect N/A N/A N/A N/A app capp control inspect timeout timeout destination destination N/A method N/A cls INSPECT_METHODS N/A N/A N/A N/A futures append N/A N/A app delay N/A getattr inspect method N/A results N/A futures N/A N/A i result N/A enumerate results N/A N/A N/A result None N/A N/A N/A N/A logger warning '%s' inspect method failed N/A N/A cls INSPECT_METHODS N/A i N/A N/A N/A worker response N/A N/A result items N/A N/A N/A response None N/A N/A info N/A N/A cls worker_cache N/A worker N/A N/A info N/A N/A N/A cls INSPECT_METHODS N/A i response N/A N/A info N/A timestamp N/A N/A time time N/A classmethod N/A gen coroutine is_worker N/A N/A self workername N/A N/A N/A N/A workername N/A workername N/A self worker_cache N/A error_reason N/A N/A self workername response N/A N/A N/A extracts error message from response N/A r response N/A N/A N/A N/A N/A N/A N/A r N/A workername get error Unknown reason N/A N/A N/A KeyError N/A N/A N/A N/A N/A logger error Failed to extract error reason from '%s' response N/A Unknown reason N/A get_active_queue_names N/A N/A cls N/A N/A N/A queues N/A set N/A N/A N/A worker info N/A N/A N/A cls worker_cache items N/A N/A q N/A N/A info get active_queues N/A N/A N/A N/A N/A queues add N/A q N/A name N/A queues N/A classmethod N/A WorkerShutDown N/A ControlHandler N/A post N/A N/A self workername N/A N/A N/A 
Shut down a worker

**Example request**:

.. sourcecode:: http

  POST /api/worker/shutdown/celery@worker2 HTTP/1.1
  Content-Length: 0
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 29
  Content-Type: application/json; charset=UTF-8

  {
      "message": "Shutting down!"
  }

:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 404: unknown worker
         N/A N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A N/A N/A logger info Shutting down '%s' worker workername N/A N/A N/A N/A N/A self capp control broadcast shutdown destination N/A workername N/A N/A N/A self write N/A dict message Shutting down! N/A N/A web authenticated N/A WorkerPoolRestart N/A ControlHandler N/A post N/A N/A self workername N/A N/A N/A 
Restart worker's pool

**Example request**:

.. sourcecode:: http

  POST /api/worker/pool/restart/celery@worker2 HTTP/1.1
  Content-Length: 0
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 56
  Content-Type: application/json; charset=UTF-8

  {
      "message": "Restarting 'celery@worker2' worker's pool"
  }

:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 403: pool restart is not enabled (see CELERYD_POOL_RESTARTS)
:statuscode 404: unknown worker
         N/A N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A N/A N/A logger info Restarting '%s' worker's pool workername N/A response N/A N/A N/A N/A self capp control broadcast pool_restart arguments N/A reload False destination N/A workername reply True N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A Restarting '%s' worker's pool workername N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to restart the '%s' pool: %s N/A workername N/A N/A self error_reason workername response N/A N/A web authenticated N/A WorkerPoolGrow N/A ControlHandler N/A post N/A N/A self workername N/A N/A N/A 
Grow worker's pool

**Example request**:

.. sourcecode:: http

  POST /api/worker/pool/grow/celery@worker2?n=3 HTTP/1.1
  Content-Length: 0
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 58
  Content-Type: application/json; charset=UTF-8

  {
      "message": "Growing 'celery@worker2' worker's pool by 3"
  }

:query n: number of pool processes to grow, default is 1
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 403: failed to grow
:statuscode 404: unknown worker
         N/A N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A n N/A N/A self get_argument n default 1 type int N/A N/A N/A logger info Growing '%s' worker's pool by '%s' workername n N/A response N/A N/A N/A N/A self capp control pool_grow n n reply True destination N/A workername N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A Growing '%s' worker's pool by %s N/A workername n N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to grow '%s' worker's pool: %s N/A workername N/A N/A self error_reason workername response N/A N/A web authenticated N/A WorkerPoolShrink N/A ControlHandler N/A post N/A N/A self workername N/A N/A N/A 
Shrink worker's pool

**Example request**:

.. sourcecode:: http

  POST /api/worker/pool/shrink/celery@worker2 HTTP/1.1
  Content-Length: 0
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 60
  Content-Type: application/json; charset=UTF-8

  {
      "message": "Shrinking 'celery@worker2' worker's pool by 1"
  }

:query n: number of pool processes to shrink, default is 1
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 403: failed to shrink
:statuscode 404: unknown worker
         N/A N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A n N/A N/A self get_argument n default 1 type int N/A N/A N/A logger info Shrinking '%s' worker's pool by '%s' workername n N/A response N/A N/A N/A N/A self capp control pool_shrink n n reply True destination N/A workername N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A Shrinking '%s' worker's pool by %s N/A workername n N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to shrink '%s' worker's pool: %s N/A workername N/A N/A self error_reason workername response N/A N/A web authenticated N/A WorkerPoolAutoscale N/A ControlHandler N/A post N/A N/A self workername N/A N/A N/A 
Autoscale worker pool

**Example request**:

.. sourcecode:: http

  POST /api/worker/pool/autoscale/celery@worker2?min=3&max=10 HTTP/1.1
  Content-Length: 0
  Content-Type: application/x-www-form-urlencoded; charset=utf-8
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 66
  Content-Type: application/json; charset=UTF-8

  {
      "message": "Autoscaling 'celery@worker2' worker (min=3, max=10)"
  }

:query min: minimum number of pool processes
:query max: maximum number of pool processes
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 403: autoscaling is not enabled (see CELERYD_AUTOSCALER)
:statuscode 404: unknown worker
         N/A N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A min N/A N/A self get_argument min type int N/A max N/A N/A self get_argument max type int N/A N/A N/A logger info Autoscaling '%s' worker by '%s' workername N/A min max N/A response N/A N/A N/A N/A self capp control broadcast autoscale arguments N/A min max min max destination N/A workername reply True N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A Autoscaling '%s' worker (min=%s, max=%s) N/A workername min max N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to autoscale '%s' worker: %s N/A workername N/A N/A self error_reason workername response N/A N/A web authenticated N/A WorkerQueueAddConsumer N/A ControlHandler N/A post N/A N/A self workername N/A N/A N/A 
Start consuming from a queue

**Example request**:

.. sourcecode:: http

  POST /api/worker/queue/add-consumer/celery@worker2?queue=sample-queue
  Content-Length: 0
  Content-Type: application/x-www-form-urlencoded; charset=utf-8
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 40
  Content-Type: application/json; charset=UTF-8

  {
      "message": "add consumer sample-queue"
  }

:query queue: the name of a new queue
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 403: failed to add consumer
:statuscode 404: unknown worker
         N/A N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A queue N/A N/A self get_argument queue N/A N/A N/A logger info Adding consumer '%s' to worker '%s' queue workername N/A response N/A N/A N/A N/A self capp control broadcast add_consumer arguments N/A queue queue destination N/A workername reply True N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A N/A N/A response N/A 0 N/A workername N/A ok N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to add '%s' consumer to '%s' worker: %s N/A queue workername N/A N/A self error_reason workername response N/A N/A web authenticated N/A WorkerQueueCancelConsumer N/A ControlHandler N/A post N/A N/A self workername N/A N/A N/A 
Stop consuming from a queue

**Example request**:

.. sourcecode:: http

  POST /api/worker/queue/cancel-consumer/celery@worker2?queue=sample-queue
  Content-Length: 0
  Content-Type: application/x-www-form-urlencoded; charset=utf-8
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 52
  Content-Type: application/json; charset=UTF-8

  {
      "message": "no longer consuming from sample-queue"
  }

:query queue: the name of queue
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 403: failed to cancel consumer
:statuscode 404: unknown worker
         N/A N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A queue N/A N/A self get_argument queue N/A N/A N/A logger info Canceling consumer '%s' from worker '%s' queue workername N/A response N/A N/A N/A N/A self capp control broadcast cancel_consumer arguments N/A queue queue destination N/A workername reply True N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A N/A N/A response N/A 0 N/A workername N/A ok N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to cancel '%s' consumer from '%s' worker: %s N/A queue workername N/A N/A self error_reason workername response N/A N/A web authenticated N/A TaskRevoke N/A ControlHandler N/A post N/A N/A self taskid N/A N/A N/A 
Revoke a task

**Example request**:

.. sourcecode:: http

  POST /api/task/revoke/1480b55c-b8b2-462c-985e-24af3e9158f9?terminate=true
  Content-Length: 0
  Content-Type: application/x-www-form-urlencoded; charset=utf-8
  Host: localhost:5555

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 61
  Content-Type: application/json; charset=UTF-8

  {
      "message": "Revoked '1480b55c-b8b2-462c-985e-24af3e9158f9'"
  }

:query terminate: terminate the task if it is running
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
         N/A N/A N/A logger info Revoking task '%s' taskid N/A terminate N/A N/A self get_argument terminate default False type bool N/A N/A N/A N/A N/A self capp control revoke taskid terminate terminate N/A N/A N/A self write N/A dict message N/A Revoked '%s' taskid N/A N/A web authenticated N/A TaskTimout N/A ControlHandler N/A post N/A N/A self taskname N/A N/A N/A 
Change soft and hard time limits for a task

**Example request**:

.. sourcecode:: http

    POST /api/task/timeout/tasks.sleep HTTP/1.1
    Content-Length: 44
    Content-Type: application/x-www-form-urlencoded; charset=utf-8
    Host: localhost:5555

    soft=30&hard=100&workername=celery%40worker1

**Example response**:

.. sourcecode:: http

    HTTP/1.1 200 OK
    Content-Length: 46
    Content-Type: application/json; charset=UTF-8

    {
        "message": "new rate limit set successfully"
    }

:query workername: worker name
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 404: unknown task/worker
         N/A workername N/A N/A self get_argument workername N/A hard N/A N/A self get_argument hard default None type float N/A soft N/A N/A self get_argument soft default None type float N/A N/A taskname N/A N/A self capp tasks N/A N/A N/A N/A web HTTPError 404 N/A Unknown task '%s' taskname N/A N/A N/A workername None N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A N/A N/A logger info Setting timeouts for '%s' task (%s, %s) taskname soft hard N/A destination N/A N/A workername None N/A workername None N/A response N/A N/A N/A N/A self capp control time_limit taskname reply True hard hard soft soft destination destination N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A N/A N/A response N/A 0 N/A workername N/A ok N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to set timeouts: '%s' N/A N/A self error_reason taskname response N/A N/A web authenticated N/A TaskRateLimit N/A ControlHandler N/A post N/A N/A self taskname N/A N/A N/A 
Change rate limit for a task

**Example request**:

.. sourcecode:: http

    POST /api/task/rate-limit/tasks.sleep HTTP/1.1
    Content-Length: 41
    Content-Type: application/x-www-form-urlencoded; charset=utf-8
    Host: localhost:5555

    ratelimit=200&workername=celery%40worker1

**Example response**:

.. sourcecode:: http

  HTTP/1.1 200 OK
  Content-Length: 61
  Content-Type: application/json; charset=UTF-8

  {
      "message": "Revoked '1480b55c-b8b2-462c-985e-24af3e9158f9'"
  }

:query workername: worker name
:reqheader Authorization: optional OAuth token to authenticate
:statuscode 200: no error
:statuscode 401: unauthorized request
:statuscode 404: unknown task/worker
         N/A workername N/A N/A self get_argument workername N/A ratelimit N/A N/A self get_argument ratelimit N/A N/A taskname N/A N/A self capp tasks N/A N/A N/A N/A web HTTPError 404 N/A Unknown task '%s' taskname N/A N/A N/A workername None N/A N/A N/A self is_worker workername N/A N/A N/A N/A web HTTPError 404 N/A Unknown worker '%s' workername N/A N/A N/A logger info Setting '%s' rate limit for '%s' task ratelimit taskname N/A destination N/A N/A workername None N/A workername None N/A response N/A N/A N/A N/A self capp control rate_limit taskname ratelimit reply True destination destination N/A N/A response N/A ok N/A N/A response N/A 0 N/A workername N/A N/A N/A N/A self write N/A dict message N/A N/A N/A response N/A 0 N/A workername N/A ok N/A N/A N/A N/A logger error response N/A N/A N/A self set_status 403 N/A N/A N/A self write N/A Failed to set rate limit: '%s' N/A N/A self error_reason taskname response N/A N/A web authenticated N/A