slight refactoring

pull/1357/head
Chris Caron 2025-07-06 20:30:08 -04:00
parent ac5aa5a333
commit bcfeed9519
1 changed files with 3 additions and 1 deletions

View File

@ -108,7 +108,6 @@ class NotifySpike(NotifyBase):
def send(self, body, title="", notify_type=NotifyType.INFO, **kwargs): def send(self, body, title="", notify_type=NotifyType.INFO, **kwargs):
"""Send Spike.sh Notification.""" """Send Spike.sh Notification."""
self.throttle()
payload = { payload = {
"message": title if title else body, "message": title if title else body,
@ -120,6 +119,9 @@ class NotifySpike(NotifyBase):
"Content-Type": "application/json", "Content-Type": "application/json",
} }
# Always call throttle before any remote server i/o is made
self.throttle()
try: try:
response = requests.post( response = requests.post(
self.webhook_url, self.webhook_url,