Add downloaded frame counter

master
Lauri Võsandi 2 months ago
parent ce95ffc8d3
commit 5a1ea54e49
  1. 3
      camdetect.py

@ -128,6 +128,7 @@ gauge_queue_frames.labels("download").set(0)
gauge_queue_frames.labels("hold").set(0)
gauge_queue_frames.labels("upload").set(0)
counter_frames.labels("motion").inc(0)
counter_frames.labels("downloaded").inc(0)
assert SLIDE_WINDOW <= 8 # This is 256 frames which should be enough
@ -432,6 +433,8 @@ async def downloader(queue: asyncio.Queue):
j = "%s.%s" % (e.__class__.__module__, e.__class__.__name__)
logger.info("Caught exception %s", j)
counter_errors.labels("download", j).inc()
else:
counter_frames.labels("downloaded").inc()
await asyncio.sleep(1)
app = Sanic("camdetect")

Loading…
Cancel
Save