Skip to content

Commit

Permalink
Allow the timeout limit to be specified when sending events through H…
Browse files Browse the repository at this point in the history
…TTP (#48)
  • Loading branch information
josepduarte authored Dec 6, 2024
1 parent 34d280d commit 3776106
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/appier_extras/parts/admin/models/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down

0 comments on commit 3776106

Please sign in to comment.