Enhance environment variable handling, add Celery configuration, and implement device expiration notification tasks
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 13m45s

This commit is contained in:
2025-04-24 10:42:22 +05:00
parent ee8145f07f
commit 99982d13d5
8 changed files with 106 additions and 14 deletions

View File

@ -4,8 +4,13 @@ import json
import logging
logger = logging.getLogger(__name__)
api_url = config("SMS_API_URL", default="")
api_key = config("SMS_API_KEY", default="")
api_url = str(config("SMS_API_URL", cast=str, default=""))
api_key = str(config("SMS_API_KEY", cast=str, default=""))
if not api_url or not api_key:
raise ValueError(
"SMS_API_URL and SMS_API_KEY must be set in the environment variables."
)
def send_otp(mobile: str, otp: int, message: str):