Browse Source

timeout on all the notifications

pull/9/head
Di Wu 9 years ago
parent
commit
93c71ad10e
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      hc/api/models.py

+ 3
- 3
hc/api/models.py View File

@ -143,7 +143,7 @@ class Channel(models.Model):
"icon_url": "https://healthchecks.io/static/img/[email protected]" "icon_url": "https://healthchecks.io/static/img/[email protected]"
} }
r = requests.post(self.value, json=payload)
r = requests.post(self.value, json=payload, timeout=5)
n.status = r.status_code n.status = r.status_code
n.save() n.save()
@ -155,7 +155,7 @@ class Channel(models.Model):
"color": "green" if check.status == "up" else "red", "color": "green" if check.status == "up" else "red",
} }
r = requests.post(self.value, json=payload)
r = requests.post(self.value, json=payload, timeout=5)
n.status = r.status_code n.status = r.status_code
n.save() n.save()
@ -179,7 +179,7 @@ class Channel(models.Model):
} }
url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json" url = "https://events.pagerduty.com/generic/2010-04-15/create_event.json"
r = requests.post(url, data=json.dumps(payload))
r = requests.post(url, data=json.dumps(payload), timeout=5)
n.status = r.status_code n.status = r.status_code
n.save() n.save()


Loading…
Cancel
Save