Fix downloaded frame counter
All checks were successful
continuous-integration/drone Build is passing
All checks were successful
continuous-integration/drone Build is passing
This commit is contained in:
parent
5a1ea54e49
commit
c23d8856c2
@ -404,6 +404,8 @@ async def download(resp, queue):
|
|||||||
generate_thumbnail(dct)))
|
generate_thumbnail(dct)))
|
||||||
except asyncio.QueueFull:
|
except asyncio.QueueFull:
|
||||||
counter_dropped_frames.labels("download").inc()
|
counter_dropped_frames.labels("download").inc()
|
||||||
|
else:
|
||||||
|
counter_frames.labels("downloaded").inc()
|
||||||
gauge_queue_frames.labels("download").set(queue.qsize())
|
gauge_queue_frames.labels("download").set(queue.qsize())
|
||||||
data = data[marker + 2:]
|
data = data[marker + 2:]
|
||||||
buf = b""
|
buf = b""
|
||||||
@ -433,8 +435,6 @@ async def downloader(queue: asyncio.Queue):
|
|||||||
j = "%s.%s" % (e.__class__.__module__, e.__class__.__name__)
|
j = "%s.%s" % (e.__class__.__module__, e.__class__.__name__)
|
||||||
logger.info("Caught exception %s", j)
|
logger.info("Caught exception %s", j)
|
||||||
counter_errors.labels("download", j).inc()
|
counter_errors.labels("download", j).inc()
|
||||||
else:
|
|
||||||
counter_frames.labels("downloaded").inc()
|
|
||||||
await asyncio.sleep(1)
|
await asyncio.sleep(1)
|
||||||
|
|
||||||
app = Sanic("camdetect")
|
app = Sanic("camdetect")
|
||||||
|
Loading…
Reference in New Issue
Block a user