update
This commit is contained in:
@@ -8,16 +8,14 @@ COURSE_TABLE: str = os.getenv('COURSE_TABLE') # type: ignore
|
||||
KONVIVA_API_URL: str = os.getenv('KONVIVA_API_URL') # type: ignore
|
||||
KONVIVA_SECRET_KEY: str = os.getenv('KONVIVA_SECRET_KEY') # type: ignore
|
||||
|
||||
match os.getenv('AWS_SAM_LOCAL'), os.getenv('ELASTIC_HOSTS'):
|
||||
case str() as AWS_SAM_LOCAL, _ if (
|
||||
AWS_SAM_LOCAL
|
||||
): # Only when running `sam local start-api`
|
||||
match os.getenv('AWS_SAM_LOCAL'), os.getenv('PYTEST_VERSION'):
|
||||
case str() as SAM_LOCAL, _ if SAM_LOCAL: # Only when running `sam local start-api`
|
||||
ELASTIC_CONN = {
|
||||
'hosts': 'http://host.docker.internal:9200',
|
||||
}
|
||||
case _, str() as ELASTIC_HOSTS if ELASTIC_HOSTS:
|
||||
case _, str() as PYTEST if PYTEST: # Only when running `pytest`
|
||||
ELASTIC_CONN = {
|
||||
'hosts': ELASTIC_HOSTS,
|
||||
'hosts': 'http://127.0.0.1:9200',
|
||||
}
|
||||
case _:
|
||||
ELASTIC_CLOUD_ID = os.getenv('ELASTIC_CLOUD_ID')
|
||||
|
||||
Reference in New Issue
Block a user