(20241204) Fixing alerts bug.

This commit is contained in:
2024-12-04 17:22:02 +05:30
parent 0918db250b
commit d9f0348578
3 changed files with 233 additions and 6 deletions
+5 -3
View File
@@ -160,17 +160,19 @@ class BaseModel:
:return: None.
"""
print("Alert time!")
if self._http_client is not None and self._alert_url is not None:
print("ALERTTT!!!")
response = await self._http_client.post(
url = self._alert_url,
headers = {
"X-Session-Token": session_token
},
headers = {"X-Session-Token": session_token} if session_token else None,
json = {
"message": message,
"type": alert_type
}
)
print(response)
print(response.json())
async def call_cached_procedure(
self,