Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
brian-dashboard-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
geant-swd
brian
brian-dashboard-manager
Commits
2f7de09b
Commit
2f7de09b
authored
4 years ago
by
Release Webservice
Browse files
Options
Downloads
Plain Diff
Finished release 0.3.
parents
386e8dee
b2c423c6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
brian_dashboard_manager/grafana/provision.py
+4
-4
4 additions, 4 deletions
brian_dashboard_manager/grafana/provision.py
changelog.md
+2
-0
2 additions, 0 deletions
changelog.md
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
7 additions
and
5 deletions
brian_dashboard_manager/grafana/provision.py
+
4
−
4
View file @
2f7de09b
...
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
changelog.md
+
2
−
0
View file @
2f7de09b
# 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
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
2f7de09b
...
...
@@ -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
=
''
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment