Skip to content

Commit

Permalink
feat: modify pagination size 1000 -> 2000
Browse files Browse the repository at this point in the history
Signed-off-by: ImMin5 <[email protected]>
  • Loading branch information
ImMin5 committed Oct 18, 2023
1 parent 850b198 commit deb1857
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

_LOGGER = logging.getLogger(__name__)

_PAGE_SIZE = 1000
_PAGE_SIZE = 2000


class AzureCostMgmtConnector(BaseConnector):
Expand Down
13 changes: 7 additions & 6 deletions src/cloudforet/cost_analysis/manager/cost_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit deb1857

Please sign in to comment.