2024-03-05 16:01:26 +01:00
|
|
|
import mysql.connector
|
|
|
|
import redis
|
|
|
|
import os
|
|
|
|
|
|
|
|
from app.config import RedisConfig
|
|
|
|
from app.config import MySqlConfig
|
|
|
|
|
|
|
|
db_connection = mysql.connector.connect(
|
|
|
|
host=MySqlConfig.MYSQL_HOST,
|
|
|
|
user=MySqlConfig.MYSQL_USER,
|
|
|
|
password=MySqlConfig.MYSQL_PASSWORD,
|
|
|
|
database=MySqlConfig.MYSQL_DATABASE,
|
|
|
|
)
|
|
|
|
|
|
|
|
jwt_redis_blocklist = redis.StrictRedis(
|
|
|
|
host=RedisConfig.REDIS_HOST,
|
|
|
|
port=RedisConfig.REDIS_PORT,
|
2024-03-28 21:22:23 +01:00
|
|
|
password=RedisConfig.REDIS_PASSWORD,
|
2024-03-05 16:01:26 +01:00
|
|
|
db=0,
|
|
|
|
decode_responses=True
|
|
|
|
)
|