diff --git a/brian_dashboard_manager/grafana/provision.py b/brian_dashboard_manager/grafana/provision.py index 2a69308e49df7abce49541b078506853b3e1afb0..c5f0af77ffd12b9a0f1b7479d391c2b6c1e9eb14 100644 --- a/brian_dashboard_manager/grafana/provision.py +++ b/brian_dashboard_manager/grafana/provision.py @@ -30,7 +30,7 @@ logger = logging.getLogger(__name__) def generate_all_nrens(token_request, nrens, folder_id, datasource_name): - with ThreadPoolExecutor(max_workers=12) as executor: + with ThreadPoolExecutor(max_workers=3) as executor: for dashboard in generate_nrens(nrens, datasource_name): executor.submit(create_dashboard, token_request, dashboard, folder_id) @@ -54,7 +54,7 @@ def provision_folder(token_request, folder_name, data = get_interface_data(relevant_interfaces, parse_func) dash_data = get_dashboard_data(data, datasource_name, tag, errors) - with ThreadPoolExecutor(max_workers=12) as executor: + with ThreadPoolExecutor(max_workers=3) as executor: for dashboard in dash_data: rendered = render_dashboard(dashboard) executor.submit(create_dashboard, token_request, @@ -80,8 +80,8 @@ def provision(config): start = time.time() - with ProcessPoolExecutor(max_workers=4) as org_executor, \ - ThreadPoolExecutor(max_workers=12) as thread_executor: + with ProcessPoolExecutor(max_workers=3) as org_executor, \ + ThreadPoolExecutor(max_workers=3) as thread_executor: for org in all_orgs: org_id = org['id'] delete_expired_api_tokens(request, org_id) diff --git a/changelog.md b/changelog.md index 80f71dd0df0df1e75c53703f104086fc1534d734..4224ebf2e782cd173d986402aa9f947dc30d967d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,8 @@ # Changelog All notable changes to this project will be documented in this file. +## [0.3] - 2021-03-03 +- Tune down the amount of concurrency, as Grafana servers can't keep up ## [0.2] - 2021-03-03 - Generate and provision dashboards concurrently to reduce time to provision diff --git a/setup.py b/setup.py index 2d8566df62a0a0f8b9fb2e98b29923854fa832ff..c227a3eb1a6eec6b0f33efad2237697ed616ba28 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from setuptools import setup, find_packages setup( name='brian-dashboard-manager', - version="0.2", + version="0.3", author='GEANT', author_email='swd@geant.org', description='',