Browse Source

Include timestamp in the metrics response.

pull/366/head
Pēteris Caune 5 years ago
parent
commit
98310eeeaa
No known key found for this signature in database GPG Key ID: E28D7679E9A9EDE2
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      hc/api/views.py

+ 2
- 0
hc/api/views.py View File

@ -1,4 +1,5 @@
from datetime import timedelta as td
import time
import uuid
from django.conf import settings
@ -329,6 +330,7 @@ def metrics(request):
return HttpResponseForbidden()
doc = {}
doc["ts"] = int(time.time())
doc["max_ping_id"] = Ping.objects.values_list("id", flat=True).last()
doc["num_unprocessed_flips"] = Flip.objects.filter(processed__isnull=True).count()


Loading…
Cancel
Save