From dfaab4f5fcde2ef6946891d824553d7931d73319 Mon Sep 17 00:00:00 2001 From: ImMin5 Date: Mon, 18 Dec 2023 02:42:24 +0900 Subject: [PATCH] feat: add Handler config example --- .../cost_analysis/conf/global_conf.py | 58 +++++++++++-------- 1 file changed, 33 insertions(+), 25 deletions(-) diff --git a/src/spaceone/cost_analysis/conf/global_conf.py b/src/spaceone/cost_analysis/conf/global_conf.py index 87c9639f..d45ba6e5 100644 --- a/src/spaceone/cost_analysis/conf/global_conf.py +++ b/src/spaceone/cost_analysis/conf/global_conf.py @@ -1,40 +1,48 @@ DATABASE_AUTO_CREATE_INDEX = True DATABASES = { - 'default': { - 'db': 'cost-analysis', - 'host': 'localhost', - 'port': 27017, - 'username': '', - 'password': '' + "default": { + "db": "cost-analysis", + "host": "localhost", + "port": 27017, + "username": "", + "password": "", } } CACHES = { - 'default': {}, - 'local': { - 'backend': 'spaceone.core.cache.local_cache.LocalCache', - 'max_size': 128, - 'ttl': 300 - } + "default": {}, + "local": { + "backend": "spaceone.core.cache.local_cache.LocalCache", + "max_size": 128, + "ttl": 300, + }, } HANDLERS = { + # "authentication": [{ + # "backend": "spaceone.core.handler.authentication_handler:SpaceONEAuthenticationHandler" + # }], + # "authorization": [{ + # "backend": "spaceone.core.handler.authorization_handler:SpaceONEAuthorizationHandler" + # }], + # "mutation": [{ + # "backend": "spaceone.core.handler.mutation_handler:SpaceONEMutationHandler" + # }], + # "event": [] } CONNECTORS = { - 'SpaceConnector': { - 'backend': 'spaceone.core.connector.space_connector.SpaceConnector', - 'endpoints': { - 'identity': 'grpc://identity:50051', - 'plugin': 'grpc://plugin:50051', - 'repository': 'grpc://repository:50051', - 'secret': 'grpc://secret:50051', - 'notification': 'grpc://notification:50051' - - } - }, - 'DataSourcePluginConnector': { + "SpaceConnector": { + "backend": "spaceone.core.connector.space_connector.SpaceConnector", + "endpoints": { + "identity": "grpc://identity:50051", + "plugin": "grpc://plugin:50051", + "repository": "grpc://repository:50051", + "secret": "grpc://secret:50051", + "notification": "grpc://notification:50051", + }, }, + "DataSourcePluginConnector": {}, } # Scheduler Settings @@ -47,7 +55,7 @@ # Job Settings JOB_TIMEOUT = 600 DATA_SOURCE_SYNC_HOUR = 16 # Hour (UTC) -COST_QUERY_CACHE_TIME = 4 # Day +COST_QUERY_CACHE_TIME = 4 # Day DEFAULT_EXCHANGE_RATE = { # 'KRW': 1178.7,