diff --git a/hc/api/migrations/0031_auto_20170509_1320.py b/hc/api/migrations/0031_auto_20170509_1320.py new file mode 100644 index 00000000..51afdd83 --- /dev/null +++ b/hc/api/migrations/0031_auto_20170509_1320.py @@ -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), + ), + ] diff --git a/hc/api/models.py b/hc/api/models.py index 8a703827..bb528f38 100644 --- a/hc/api/models.py +++ b/hc/api/models.py @@ -65,7 +65,7 @@ class Check(models.Model): tz = models.CharField(max_length=36, default="UTC") n_pings = models.IntegerField(default=0) 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) status = models.CharField(max_length=6, choices=STATUSES, default="new") diff --git a/hc/api/views.py b/hc/api/views.py index 2bec2a30..3d216fc4 100644 --- a/hc/api/views.py +++ b/hc/api/views.py @@ -24,7 +24,7 @@ def ping(request, code): check.n_pings = F("n_pings") + 1 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() if check.status in ("new", "paused"): check.status = "up"