Update config.py
Browse files
config.py
CHANGED
@@ -4,11 +4,11 @@ from txagent.txagent import TxAgent
|
|
4 |
from db.mongo import get_mongo_client
|
5 |
import asyncio
|
6 |
from pyfcm import FCMNotification
|
7 |
-
from huggingface_hub import
|
8 |
from datetime import datetime
|
9 |
|
10 |
# Logging
|
11 |
-
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
12 |
logger = logging.getLogger("TxAgentAPI")
|
13 |
|
14 |
# Initialize agent synchronously with error handling
|
@@ -66,7 +66,7 @@ async def send_push_notification(recipient_email, message):
|
|
66 |
registration_id=device_token,
|
67 |
message_title="Risk Alert",
|
68 |
message_body=message,
|
69 |
-
sound="default",
|
70 |
priority="high"
|
71 |
)
|
72 |
logger.info(f"Push notification sent to {recipient_email} at {datetime.utcnow().isoformat()}: {result}")
|
|
|
4 |
from db.mongo import get_mongo_client
|
5 |
import asyncio
|
6 |
from pyfcm import FCMNotification
|
7 |
+
from huggingface_hub import get_secret
|
8 |
from datetime import datetime
|
9 |
|
10 |
# Logging
|
11 |
+
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(name)s - %(message)s")
|
12 |
logger = logging.getLogger("TxAgentAPI")
|
13 |
|
14 |
# Initialize agent synchronously with error handling
|
|
|
66 |
registration_id=device_token,
|
67 |
message_title="Risk Alert",
|
68 |
message_body=message,
|
69 |
+
sound="default",
|
70 |
priority="high"
|
71 |
)
|
72 |
logger.info(f"Push notification sent to {recipient_email} at {datetime.utcnow().isoformat()}: {result}")
|