From 377610664dd90bbff3a13720c44a3777c848a337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pedro=20Duarte?= Date: Fri, 6 Dec 2024 10:09:46 +0000 Subject: [PATCH] Allow the timeout limit to be specified when sending events through HTTP (#48) --- src/appier_extras/parts/admin/models/event.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/appier_extras/parts/admin/models/event.py b/src/appier_extras/parts/admin/models/event.py index 74e40f69..5a00c3f4 100644 --- a/src/appier_extras/parts/admin/models/event.py +++ b/src/appier_extras/parts/admin/models/event.py @@ -182,10 +182,11 @@ def _retry(cls, callable, count=3): def notify_http(self, arguments={}): cls = self.__class__ url = arguments.get("url", None) + timeout = arguments.get("timeout", None) retries = arguments.get("retries", 3) logger = appier.get_logger() logger.debug("Running HTTP notification for '%s' ..." % url) - return cls._retry(lambda: appier.post(url, data_j=arguments), count=retries) + return cls._retry(lambda: appier.post(url, timeout=timeout, data_j=arguments), count=retries) def notify_mailme(self, arguments={}): cls = self.__class__