fix(bot): 🚑 Migrate to serverless redis.
This commit is contained in:
@@ -9,7 +9,7 @@ async def flush():
|
||||
|
||||
import asyncpg.exceptions
|
||||
|
||||
import redis.asyncio as aredis
|
||||
import upstash_redis.asyncio as aredis
|
||||
|
||||
from payphone.db import models
|
||||
|
||||
@@ -31,7 +31,7 @@ async def flush():
|
||||
log.debug("Skipping flushing. No calls to flush.")
|
||||
return
|
||||
|
||||
log.info("Flushing messages for %s calls." , len(call_ids))
|
||||
log.info("Flushing messages for %s calls.", len(call_ids))
|
||||
|
||||
pipe = redis.pipeline()
|
||||
|
||||
@@ -65,7 +65,7 @@ async def flush():
|
||||
constants.CALL_MESSAGE_FROM_PROPAGATION_TEMPLATE % call_id,
|
||||
constants.CALL_MESSAGES_TEMPLATE % call_id,
|
||||
constants.CALL_MESSAGE_REPLIES_TEMPLATE % call_id,
|
||||
constants.CALL_IS_ACTIVE % call_id
|
||||
constants.CALL_IS_ACTIVE % call_id,
|
||||
)
|
||||
|
||||
await pipe.execute()
|
||||
|
||||
Reference in New Issue
Block a user