celery.task.http

celery.task.http

Webhook task implementation.

exception celery.task.http.InvalidResponseError[源代码]

The remote server gave an invalid response.

exception celery.task.http.RemoteExecuteError[源代码]

The remote task gave a custom error.

exception celery.task.http.UnknownStatusError[源代码]

The remote server gave an unknown status.

class celery.task.http.HttpDispatch(url, method, task_kwargs, \*kwargs*)[源代码]

Make task HTTP request and collect the task result.

参数:
  • 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()[源代码]

    Dispatch callback and return result.

  • http_headers None[源代码]

  • make_request(url, method, params)[源代码]

    Perform HTTP request and return the response.

  • timeout = 5

  • user_agent = ‘celery/3.1.7’

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

HTTP Callback URL

Supports requesting an URL asynchronously.

参数:
  • url – URL to request.
  • dispatcher – Class used to dispatch the request. By default this is dispatch().