Files
saladeaula.digital/enrollments-events/app/config.py
2026-01-12 22:36:34 -03:00

41 lines
1.4 KiB
Python

import os
DEDUP_WINDOW_OFFSET_DAYS = 90
USER_TABLE: str = os.getenv('USER_TABLE') # type: ignore
ORDER_TABLE: str = os.getenv('ORDER_TABLE') # type: ignore
ENROLLMENT_TABLE: str = os.getenv('ENROLLMENT_TABLE') # type: ignore
COURSE_TABLE: str = os.getenv('COURSE_TABLE') # type: ignore
BUCKET_NAME: str = os.getenv('BUCKET_NAME') # type: ignore
EMAIL_SENDER = ('EDUSEG®', 'noreply@eduseg.com.br')
HTTP_CONNECT_TIMEOUT = int(os.environ.get('HTTP_CONNECT_TIMEOUT', 1))
HTTP_READ_TIMEOUT = int(os.environ.get('HTTP_READ_TIMEOUT', 3))
PAPERFORGE_API = 'https://paperforge.saladeaula.digital'
CERT_REPORTING_URI = 's3://saladeaula.digital/certs/reporting.html'
ESIGN_URI = 's3://saladeaula.digital/esigns/11de2510136adbac.pfx'
DOCUSEAL_API = 'https://docs.eduseg.com.br'
DOCUSEAL_KEY: str = os.getenv('DOCUSEAL_KEY') # type: ignore
DBNAME: str = os.getenv('POSTGRES_DB') # type: ignore
DBHOST: str = os.getenv('POSTGRES_HOST') # type: ignore
DBPORT: str = os.getenv('POSTGRES_PORT') # type: ignore
DBUSER: str = os.getenv('POSTGRES_USER') # type: ignore
DBPASS: str = os.getenv('POSTGRES_PASSWORD') # type: ignore
conninfo = f'dbname={DBNAME} user={DBUSER} password={DBPASS} \
host={DBHOST} port={DBPORT}'
# Post-migration: Remove the following lines
if os.getenv('AWS_LAMBDA_FUNCTION_NAME'):
SQLITE_DATABASE = 'courses_export_2025-06-18_110214.db'
else:
SQLITE_DATABASE = 'app/courses_export_2025-06-18_110214.db'
SQLITE_TABLE = 'courses'