Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inventory-provider
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
dashboardv3
inventory-provider
Commits
4312bad0
Commit
4312bad0
authored
5 years ago
by
Release Webservice
Browse files
Options
Downloads
Plain Diff
Finished release 0.25.
parents
b39c80c2
88165016
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
inventory_provider/tasks/worker.py
+14
-0
14 additions, 0 deletions
inventory_provider/tasks/worker.py
setup.py
+1
-1
1 addition, 1 deletion
setup.py
with
15 additions
and
1 deletion
inventory_provider/tasks/worker.py
+
14
−
0
View file @
4312bad0
...
...
@@ -509,10 +509,21 @@ def launch_refresh_cache_all(config):
def
_wait_for_tasks
(
task_ids
,
update_callback
=
lambda
s
:
None
):
all_successful
=
True
start_time
=
time
.
time
()
while
task_ids
and
time
.
time
()
-
start_time
<
FINALIZER_TIMEOUT_S
:
update_callback
(
'
waiting for tasks to complete: %r
'
%
task_ids
)
time
.
sleep
(
FINALIZER_POLLING_FREQUENCY_S
)
def
_is_error
(
id
):
status
=
check_task_status
(
id
)
return
status
[
'
ready
'
]
and
not
status
[
'
success
'
]
if
any
([
_is_error
(
id
)
for
id
in
task_ids
]):
all_successful
=
False
task_ids
=
[
id
for
id
in
task_ids
if
not
check_task_status
(
id
)[
'
ready
'
]
...
...
@@ -521,6 +532,9 @@ def _wait_for_tasks(task_ids, update_callback=lambda s: None):
if
task_ids
:
raise
InventoryTaskError
(
'
timeout waiting for pending tasks to complete
'
)
if
not
all_successful
:
raise
InventoryTaskError
(
'
some tasks finished with an error
'
)
update_callback
(
'
pending taskscompleted in {} seconds
'
.
format
(
time
.
time
()
-
start_time
))
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
1
View file @
4312bad0
...
...
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
setup
(
name
=
'
inventory-provider
'
,
version
=
"
0.2
4
"
,
version
=
"
0.2
5
"
,
author
=
'
GEANT
'
,
author_email
=
'
swd@geant.org
'
,
description
=
'
Dashboard inventory provider
'
,
...
...
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