diff --git a/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py b/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py index 5a1d0a2..4d063ca 100644 --- a/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py +++ b/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py @@ -19,7 +19,7 @@ _LOGGER = logging.getLogger(__name__) -_PAGE_SIZE = 1000 +_PAGE_SIZE = 2000 class AzureCostMgmtConnector(BaseConnector): diff --git a/src/cloudforet/cost_analysis/manager/cost_manager.py b/src/cloudforet/cost_analysis/manager/cost_manager.py index fd9ca70..0583ef4 100644 --- a/src/cloudforet/cost_analysis/manager/cost_manager.py +++ b/src/cloudforet/cost_analysis/manager/cost_manager.py @@ -42,9 +42,7 @@ def get_data(self, options, secret_data, schema, task_options): print(f"{datetime.utcnow()} [INFO][get_data] #{idx+1} {tenant_id} tenant collect is done") end_time = time.time() print(f"{datetime.utcnow()} [INFO][get_data] all collect is done in {int(end_time - start_time)} seconds") - - - yield [] + yield [] def _make_cost_data(self, results, end, options, tenant_id=None): """ Source Data Model @@ -188,10 +186,13 @@ def _make_scope(secret_data, task_options, collect_scope, customer_tenant_id=Non @staticmethod def _convert_tags_str_to_dict(tags: str): - if tags is None: + try: + if tags is None: + return {} + return json.loads(tags) + except Exception as e: + _LOGGER.error(f'[_convert_tags_str_to_dict] tags : {tags} {e}') return {} - json_str = '{' + tags + '}' - return json.loads(json_str) @staticmethod def _set_product_from_benefit_name(benefit_name):