introduce an ApplicationConfig module to manage the environment configs in one location

This commit is contained in:
Adrian Manteza
2022-03-17 20:33:48 +00:00
parent 2410e34c05
commit fede094eeb
4 changed files with 29 additions and 15 deletions

View File

@ -1,5 +1,6 @@
import os, sys, logging
from lib.application_configs import ApplicationConfigs
from services.loft_service import LoftService
from helpers import aws_helper
@ -27,12 +28,12 @@ def main():
logging.info('Starting Solver Service (v1.1.4)...')
listener = ServiceListener(
None,
os.environ['SQS_QUEUE'],
ApplicationConfigs.sqs_queue,
create_queue=False,
region_name=os.environ['AWS_REGION'],
aws_access_key=os.environ['AWS_ACCESS_KEY_ID'],
aws_secret_key=os.environ['AWS_SECRET_ACCESS_KEY'])
# endpoint_url=os.environ['ENDPOINT_URL'])
region_name=ApplicationConfigs.region_name,
aws_access_key=ApplicationConfigs.aws_access_key_id,
aws_secret_key=ApplicationConfigs.aws_secret_key,
endpoint_url=ApplicationConfigs.endpoint_url)
listener.listen()