Fix more bugs

This commit is contained in:
Santiago Lo Coco 2023-12-01 16:09:21 -03:00
parent 1380fbccbe
commit 6c4aa99eb7
9 changed files with 19 additions and 14 deletions

View File

@ -4,6 +4,5 @@ psycopg2-binary==2.9.5
pyjwt==2.6.0
gunicorn==20.1.0
sqlalchemy==2.0.22
asyncreq==0.0.5
logmiddleware==0.0.3
async-timeout==4.0.3
asyncreq==0.0.6
logmiddleware==0.0.4

View File

@ -3,6 +3,5 @@ fastapi[all]==0.103.2
pyjwt==2.6.0
gunicorn==20.1.0
requests==2.31.0
asyncreq==0.0.5
logmiddleware==0.0.3
async-timeout==4.0.3
asyncreq==0.0.6
logmiddleware==0.0.4

View File

@ -7,6 +7,9 @@ from logmiddleware import RouterLoggingMiddleware, logging_config
from src.api.config import API_DEBUG
from src.api.routes import auth, flights, health, notifications, subscriptions, users
# from src.api.log import RouterLoggingMiddleware, logging_config
logging.config.dictConfig(logging_config)
logger = logging.getLogger(__name__)

View File

@ -2,5 +2,5 @@ POSTGRES_USER=user
POSTGRES_PASS=password
POSTGRES_DB=api_dev
APP_SETTINGS=src.config.DevelopmentConfig
TOKEN=3275588851:AT36AGy_BChQUuCq2M6d2UrY5CSWtZe45gV
TG_TOKEN=3275588851:AT36AGy_BChQUuCq2M6d2UrY5CSWtZe45gV
API_DEBUG=true

View File

@ -2,5 +2,5 @@ POSTGRES_USER=user
POSTGRES_PASS=password
POSTGRES_DB=api_prod
APP_SETTINGS=src.config.ProductionConfig
TOKEN=3275588851:AT36AGy_BChQUuCq2M6d2UrY5CSWtZe45gV
TG_TOKEN=3275588851:AT36AGy_BChQUuCq2M6d2UrY5CSWtZe45gV
API_DEBUG=false

View File

@ -15,7 +15,7 @@ services:
- PORT=5000
- DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASS}@subscriptions-db/${POSTGRES_DB}
- APP_SETTINGS=${APP_SETTINGS}
- TOKEN=${TOKEN}
- TG_TOKEN=${TG_TOKEN}
logging:
driver: gelf
options:

View File

@ -4,6 +4,5 @@ psycopg2-binary==2.9.5
pyjwt==2.6.0
gunicorn==20.1.0
sqlalchemy==2.0.22
asyncreq==0.0.5
logmiddleware==0.0.3
async-timeout==4.0.3
asyncreq==0.0.6
logmiddleware==0.0.4

View File

@ -1,4 +1,9 @@
import os
API_FLIGHTS = "http://fids_flights_api:5000/flights"
TEST_TARGET = os.getenv("TEST_TARGET")
API_DEBUG = os.getenv("API_DEBUG")
if TEST_TARGET == "INTEGRATION":
API_FLIGHTS = "http://fids-flights-dev_flights-api:5000/flights"
else:
API_FLIGHTS = "http://fids-flights_flights-api:5000/flights"

View File

@ -2,7 +2,7 @@ import os
from asyncreq import request
TOKEN = os.getenv("TOKEN")
TOKEN = os.getenv("TG_TOKEN")
async def send_message(chat_id, message):