Add downloaded frame counter
continuous-integration/drone Build is passing Details

This commit is contained in:
Lauri Võsandi 2022-09-21 09:03:40 +03:00
parent ce95ffc8d3
commit 5a1ea54e49
1 changed files with 3 additions and 0 deletions

View File

@ -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")