(20250613) - whatsapp mongo log testing.

This commit is contained in:
yatmesh
2025-06-13 12:41:48 +05:30
parent 83a9c7cf89
commit 7f59105003
2 changed files with 24 additions and 3 deletions
+21 -1
View File
@@ -40,6 +40,7 @@ from utils_v2.date_time import date_time
from utils_v2.database.async_mysql_v2 import AsyncMySQL
from utils_v2.database.async_mongo_v2 import AsyncMongo
from utils_v2.cache.async_redis_cache_v2 import AsyncRedisCache
from utils_v2.logging.context import AsyncLoggerContext
# Controllers:
from controllers_v2.message.chat.base import ChatController
@@ -65,6 +66,8 @@ import httpx
# For asynchronous activities:
import asyncio
# Common:
from shared import constants
# *****************************************************************************************************************
# ***** ****
@@ -153,7 +156,15 @@ class WhatsAppNimbusController(ChatController):
# ┗┓┏┓┏┓┏┫ ┃┃┃┏┓┏┏┏┓┏┓┏┓┏
# ┗┛┗ ┛┗┗┻ ┛ ┗┗ ┛┛┗┻┗┫┗ ┛
# ┛
@AsyncLoggerContext.log_it(
api_version="1.0.0",
project=constants.PROJECT_NAME,
log_type=constants.MODULE_NAME,
operation="whatsappSendOne",
log_input=True,
log_output=True,
sensitive_keys=None
)
async def send_one_message(
self,
sql_conn: AsyncMySQL,
@@ -221,6 +232,15 @@ class WhatsAppNimbusController(ChatController):
chatMessage = sent_message_model
)
@AsyncLoggerContext.log_it(
api_version="1.0.0",
project=constants.PROJECT_NAME,
log_type=constants.MODULE_NAME,
operation="whatsappSendMany",
log_input=True,
log_output=True,
sensitive_keys=None
)
async def send_many_messages(
self,
sql_conn: AsyncMySQL,