thorn.dispatch.celery — Thorn 1.3.0 documentation

# thorn.dispatch.celery

- thorn.dispatch.celery

## thorn.dispatch.celery

Celery-based webhook dispatcher.

class `thorn.dispatch.celery.` `Dispatcher`(timeout=None, app=None)

  Dispatcher using Celery tasks to dispatch events.

  Overrides what happens when `thorn.webhook.Event.send()` is called so that dispatching the HTTP request tasks is performed by a worker, instead of in the current process.

  `send`(event, payload, sender, timeout=None, context=None, **kwargs)

class `thorn.dispatch.celery.` `WorkerDispatcher`(timeout=None, app=None)

  Dispatcher used by the `thorn.tasks.send_event()` task.

  `group_requests`(requests)

    Group requests by keep-alive host/port/scheme ident.

  `send`(event, payload, sender, timeout=None, context=None, **kwargs)