mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-12 21:48:35 +03:00
Update metrics.py
This commit is contained in:
@@ -37,11 +37,11 @@ DATABASE_METRICS_COUNTER = Counter(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
async def redis_subscribe_worker_exceptions(REDIS_EXCEPTIONS_CHANNEL: str):
|
async def redis_subscribe_worker_exceptions(redis_exceptions_channel: str):
|
||||||
# Subscribe to Redis channel and increment the counter for each exception with info on the exception and task
|
# Subscribe to Redis channel and increment the counter for each exception with info on the exception and task
|
||||||
Redis = get_redis()
|
Redis = get_redis()
|
||||||
PubSubExceptions = Redis.pubsub()
|
PubSubExceptions = Redis.pubsub()
|
||||||
PubSubExceptions.subscribe(REDIS_EXCEPTIONS_CHANNEL)
|
PubSubExceptions.subscribe(redis_exceptions_channel)
|
||||||
while True:
|
while True:
|
||||||
message = PubSubExceptions.get_message()
|
message = PubSubExceptions.get_message()
|
||||||
if message and message["type"] == "message":
|
if message and message["type"] == "message":
|
||||||
|
|||||||
Reference in New Issue
Block a user