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
c99e4212
Commit
c99e4212
authored
5 years ago
by
Robert Latta
Browse files
Options
Downloads
Patches
Plain Diff
changed to use asynch commands instead of group to avoid crashing dev environment
parent
3ad21825
No related branches found
Branches containing commit
Tags
0.40
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inventory_provider/tasks/worker.py
+11
-10
11 additions, 10 deletions
inventory_provider/tasks/worker.py
with
11 additions
and
10 deletions
inventory_provider/tasks/worker.py
+
11
−
10
View file @
c99e4212
...
@@ -458,27 +458,28 @@ def launch_refresh_cache_all(config):
...
@@ -458,27 +458,28 @@ def launch_refresh_cache_all(config):
# first batch of subtasks: refresh cached opsdb data
# first batch of subtasks: refresh cached opsdb data
subtasks
=
[
subtasks
=
[
update_junosspace_device_list
.
s
(),
update_junosspace_device_list
.
apply_async
(),
update_interfaces_to_services
.
s
(),
update_interfaces_to_services
.
apply_async
(),
update_geant_lambdas
.
s
(),
update_geant_lambdas
.
apply_async
(),
update_circuit_hierarchy
.
s
()
update_circuit_hierarchy
.
apply_async
()
]
]
[
x
.
get
()
for
x
in
subtasks
]
results
=
group
(
subtasks
).
apply_async
()
results
.
join
()
# second batch of subtasks:
# second batch of subtasks:
# alarms db status cache
# alarms db status cache
# juniper netconf & snmp data
# juniper netconf & snmp data
subtasks
=
[
subtasks
=
[
update_equipment_locations
.
s
(),
update_equipment_locations
.
apply_async
(),
]
]
for
hostname
in
_derive_router_hostnames
(
config
):
for
hostname
in
_derive_router_hostnames
(
config
):
logger
.
debug
(
logger
.
debug
(
'
queueing router refresh jobs for %r
'
%
hostname
)
'
queueing router refresh jobs for %r
'
%
hostname
)
subtasks
.
append
(
reload_router_config
.
s
(
hostname
))
subtasks
.
append
(
reload_router_config
.
apply_async
(
args
=
[
hostname
]))
break
return
[
r
.
id
for
r
in
group
(
subtasks
).
apply_async
()]
[
x
.
get
()
for
x
in
subtasks
]
return
[
x
.
id
for
x
in
subtasks
]
def
check_task_status
(
task_id
):
def
check_task_status
(
task_id
):
...
...
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