Fix downloaded frame counter

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

@ -404,6 +404,8 @@ async def download(resp, queue):
generate_thumbnail(dct)))
except asyncio.QueueFull:
counter_dropped_frames.labels("download").inc()
else:
counter_frames.labels("downloaded").inc()
gauge_queue_frames.labels("download").set(queue.qsize())
data = data[marker + 2:]
buf = b""
@ -433,8 +435,6 @@ 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