Resetting utils subtree.

This commit is contained in:
yatmesh
2025-06-12 13:46:29 +05:30
parent c6ac5c6570
commit c03e75d30e
214 changed files with 290 additions and 148757 deletions
+4 -1
View File
@@ -300,6 +300,7 @@ async def get_reminders_to_send() -> pd.DataFrame | None:
backoff_multiplier = 1.1,
return_exception = True
)
print("RES", json.to_string(db_json))
# Capture needed parts of the response:
db_status = db_json["status"]
@@ -334,6 +335,7 @@ async def get_reminders_to_send() -> pd.DataFrame | None:
message = (
"*Reminders For Work*\n\n"
f"Status: `{db_status}`\n\n"
f"Status: `{db_status}`\n\n"
f"Message: `{db_message}`\n\n"
f"Exception: `{exception}`"
),
@@ -388,7 +390,7 @@ async def send_reminders_by_chat(chat_df: pd.DataFrame) -> None:
"tags": ["Work Reminder"]
}
)
print("SEND MESSAGE RES:", response.text)
# Get the log id from the response:
log_id = response.json()["logId"]
api_message = response.json()["message"]
@@ -515,6 +517,7 @@ async def send_reminders_once() -> None:
"""
reminders_df = await get_reminders_to_send()
print(reminders_df)
if reminders_df is not None and not reminders_df.empty:
tasks = [
send_reminders_by_chat(reminders_df[reminders_df["serviceType"] == "chat"]),