some-fixes
Some checks failed
deploy / deploy (push) Failing after 1m12s

This commit is contained in:
2023-11-22 15:09:24 +03:00
parent 4530b2a1e9
commit 856a331836
15 changed files with 63 additions and 90 deletions

View File

@@ -1,11 +1,11 @@
import json
from services.rediscache import redis
from validators.chat import Message, ChatUpdate
from models.chat import Message, ChatUpdate
async def notify_message(message: Message, action="create"):
channel_name = f"message:{message["chat_id"]}"
channel_name = f"message:{message['chat_id']}"
data = {"payload": message, "action": action}
try:
await redis.publish(channel_name, json.dumps(data))