From 6bc4948d00744e677f727bb00dd4e2332852c9fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Tue, 4 Feb 2020 15:32:25 +0200 Subject: [PATCH] Removing obsolete comment: the index is defined in hc.api.models.Check.Meta --- hc/api/management/commands/sendalerts.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/hc/api/management/commands/sendalerts.py b/hc/api/management/commands/sendalerts.py index 0e81e338..6bb01d16 100644 --- a/hc/api/management/commands/sendalerts.py +++ b/hc/api/management/commands/sendalerts.py @@ -82,9 +82,6 @@ class Command(BaseCommand): now = timezone.now() - # In PostgreSQL, add this index to run the below query efficiently: - # CREATE INDEX api_check_up ON api_check (alert_after) WHERE status = 'up' - q = Check.objects.filter(alert_after__lt=now).exclude(status="down") # Sort by alert_after, to avoid unnecessary sorting by id: check = q.order_by("alert_after").first()