forked from GithubBackups/healthchecks
1KB for message bodies is not enough--email headers alone can take 5KB. Changing to 10KB
This commit is contained in:
parent
3862cd6b06
commit
6920439f92
20
hc/api/migrations/0031_auto_20170509_1320.py
Normal file
20
hc/api/migrations/0031_auto_20170509_1320.py
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
# Generated by Django 1.10.5 on 2017-05-09 13:20
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('api', '0030_check_last_ping_body'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='check',
|
||||||
|
name='last_ping_body',
|
||||||
|
field=models.CharField(blank=True, max_length=10000),
|
||||||
|
),
|
||||||
|
]
|
@ -65,7 +65,7 @@ class Check(models.Model):
|
|||||||
tz = models.CharField(max_length=36, default="UTC")
|
tz = models.CharField(max_length=36, default="UTC")
|
||||||
n_pings = models.IntegerField(default=0)
|
n_pings = models.IntegerField(default=0)
|
||||||
last_ping = models.DateTimeField(null=True, blank=True)
|
last_ping = models.DateTimeField(null=True, blank=True)
|
||||||
last_ping_body = models.CharField(max_length=1000, blank=True)
|
last_ping_body = models.CharField(max_length=10000, blank=True)
|
||||||
alert_after = models.DateTimeField(null=True, blank=True, editable=False)
|
alert_after = models.DateTimeField(null=True, blank=True, editable=False)
|
||||||
status = models.CharField(max_length=6, choices=STATUSES, default="new")
|
status = models.CharField(max_length=6, choices=STATUSES, default="new")
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ def ping(request, code):
|
|||||||
|
|
||||||
check.n_pings = F("n_pings") + 1
|
check.n_pings = F("n_pings") + 1
|
||||||
check.last_ping = timezone.now()
|
check.last_ping = timezone.now()
|
||||||
check.last_ping_body = request.body[:1000]
|
check.last_ping_body = request.body[:10000]
|
||||||
check.alert_after = check.get_alert_after()
|
check.alert_after = check.get_alert_after()
|
||||||
if check.status in ("new", "paused"):
|
if check.status in ("new", "paused"):
|
||||||
check.status = "up"
|
check.status = "up"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user