Dispatch Module

Handles the dispatching of actions to the appropriate action handler.

action_triggers.dispatch.handle_action(config: Config, instance: Model) None[source]

Handle the action for the given config and instance.

For each webhook and message broker queue associated with the config, the payload is generated and sent to the respective handlers.

Parameters:
  • config – The configuration object.

  • instance – The model instance which triggered the action.

Returns:

None

async action_triggers.dispatch.process_webhook(config: Config, instance: Webhook, payload: dict | str) None[source]

Process the webhook for the given config and instance.

Parameters:
  • config – The configuration object.

  • instance – The webhook instance to process.

  • payload – The payload to send with the webhook.

Returns:

None