This document describes the current stable version of Celery (3.1). For development docs, go here.

celery.task.http

celery.task.http

Webhook task implementation.

exception celery.task.http.InvalidResponseError[source]

The remote server gave an invalid response.

exception celery.task.http.RemoteExecuteError[source]

The remote task gave a custom error.

exception celery.task.http.UnknownStatusError[source]

The remote server gave an unknown status.

class celery.task.http.HttpDispatch(url, method, task_kwargs, **kwargs)[source]

Make task HTTP request and collect the task result.

Parameters:
  • url – The URL to request.
  • method – HTTP method used. Currently supported methods are GET and POST.
  • task_kwargs – Task keyword arguments.
  • logger – Logger used for user/system feedback.
dispatch()[source]

Dispatch callback and return result.

http_headers[source]
make_request(url, method, params)[source]

Perform HTTP request and return the response.

timeout = 5
user_agent = 'celery/3.1.11'
(task)celery.task.http.dispatch(self, url=None, method='GET', **kwargs)[source]

Task dispatching to an URL.

Parameters:
  • url – The URL location of the HTTP callback task.
  • method – Method to use when dispatching the callback. Usually GET or POST.
  • **kwargs – Keyword arguments to pass on to the HTTP callback.
celery.task.http.url

If this is set, this is used as the default URL for requests. Default is to require the user of the task to supply the url as an argument, as this attribute is intended for subclasses.

celery.task.http.method

If this is set, this is the default method used for requests. Default is to require the user of the task to supply the method as an argument, as this attribute is intended for subclasses.

class celery.task.http.URL(url, dispatcher=None, app=None)[source]

HTTP Callback URL

Supports requesting an URL asynchronously.

Parameters:
  • url – URL to request.
  • dispatcher – Class used to dispatch the request. By default this is dispatch().
dispatcher = None
get_async(**kwargs)[source]
post_async(**kwargs)[source]

Previous topic

celery.result

Next topic

celery.schedules

This Page