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.
-
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.
-
http_headers
¶
-
timeout
= 5¶
-
user_agent
= 'celery/3.1.25'¶
-
(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¶