thorn.dispatch.celery
Celery-based webhook dispatcher.
-
class
thorn.dispatch.celery.
Dispatcher
(timeout=None, app=None)[source]
Dispatcher using Celery tasks to dispatch events.
Note
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)[source]
-
class
thorn.dispatch.celery.
WorkerDispatcher
(timeout=None, app=None)[source]
Dispatcher used by the thorn.tasks.send_event()
task.
-
group_requests
(requests)[source]
Group requests by keep-alive host/port/scheme ident.
-
send
(event, payload, sender, timeout=None, context=None, **kwargs)[source]