From 79e4e02b1136aef4c832a4e2e625b2e4c1599418 Mon Sep 17 00:00:00 2001 From: ImMin5 Date: Tue, 6 Aug 2024 22:36:28 +0900 Subject: [PATCH] feat: modify task size '4' -> '5' Signed-off-by: ImMin5 --- .../cost_analysis/connector/azure_cost_mgmt_connector.py | 4 ++-- src/cloudforet/cost_analysis/manager/job_manager.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 69d27b9..0b45a7f 100644 --- a/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py +++ b/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py @@ -311,7 +311,7 @@ def convert_nested_dictionary(self, cloud_svc_object): def _retry_request(self, response, url, headers, json, retry_count, method="post"): try: - print(f"{datetime.utcnow()}[INFO] retry_request {response.headers}") + _LOGGER.error(f"{datetime.utcnow()}[INFO] retry_request {response.headers}") if retry_count == 0: raise ERROR_UNKNOWN( message=f"[ERROR] retry_request failed {response.json()}" @@ -353,7 +353,7 @@ def _download_cost_data(blob: dict) -> str: @staticmethod def _get_sleep_time(response_headers): - sleep_time = 0 + sleep_time = 30 for key, value in response_headers.items(): if "retry" in key.lower(): if isinstance(value, str) is False: diff --git a/src/cloudforet/cost_analysis/manager/job_manager.py b/src/cloudforet/cost_analysis/manager/job_manager.py index 36faffd..7873147 100644 --- a/src/cloudforet/cost_analysis/manager/job_manager.py +++ b/src/cloudforet/cost_analysis/manager/job_manager.py @@ -11,7 +11,7 @@ _LOGGER = logging.getLogger("spaceone") -_TASK_LIST_SIZE = 4 +_TASK_LIST_SIZE = 5 class JobManager(BaseManager):