Removing obsolete comment: the index is defined in hc.api.models.Check.Meta

This commit is contained in:
Pēteris Caune 2020-02-04 15:32:25 +02:00
parent 3048a20f9b
commit 6bc4948d00
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2

View File

@ -82,9 +82,6 @@ class Command(BaseCommand):
now = timezone.now() 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") q = Check.objects.filter(alert_after__lt=now).exclude(status="down")
# Sort by alert_after, to avoid unnecessary sorting by id: # Sort by alert_after, to avoid unnecessary sorting by id:
check = q.order_by("alert_after").first() check = q.order_by("alert_after").first()