hurricane.webhooks
hurricane.webhooks.base
- class hurricane.webhooks.base.Webhook(code=None)[source]
Base class for webhooks in the registry. Run function initiates sending of webhook to the specified url.
- run(url: str, status: hurricane.webhooks.base.WebhookStatus, error_trace: Optional[str] = None, close_loop: bool = False, loop=None)[source]
Initiates the sending of webhook in an asynchronous manner. Also specifies the callback of the async process, which handles the feedback and either logs success or failure of a webhook sending process.
url : Url, which webhook should be sent to status : can be either WebhookStatus.FAILED or WebhookStatus.SUCCEEDED depending on the success or failure of the process, which should be indicated by the webhook error_trace : specifies the error trace of the preceding failure close_loop : specifies, whether the main loop should be closed or be left running