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
b1cc54fb
Commit
b1cc54fb
authored
3 years ago
by
Erik Reid
Browse files
Options
Downloads
Patches
Plain Diff
don't keep old data, strip cache
parent
11e500a8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/data/update-test-db.py
+12
-1
12 additions, 1 deletion
test/data/update-test-db.py
with
12 additions
and
1 deletion
test/data/update-test-db.py
+
12
−
1
View file @
b1cc54fb
...
...
@@ -12,6 +12,14 @@ def load_current_data(data_file):
return
json
.
load
(
data_file
)
def
_ignore_key
(
key
):
if
key
.
startswith
(
'
classifier-cache:
'
):
return
True
if
key
.
startswith
(
'
joblog:
'
):
return
True
return
False
def
_redis_client_proc
(
key_queue
,
value_queue
,
hostname
,
db_index
):
r
=
redis
.
StrictRedis
(
host
=
hostname
,
db
=
db_index
)
while
True
:
...
...
@@ -20,6 +28,9 @@ def _redis_client_proc(key_queue, value_queue, hostname, db_index):
if
not
key
:
break
if
_ignore_key
(
key
):
continue
value_queue
.
put
({
'
key
'
:
key
,
'
value
'
:
r
.
get
(
key
).
decode
(
'
utf-8
'
)
...
...
@@ -80,7 +91,7 @@ if __name__ == '__main__':
conf
=
{
'
file
'
:
'
router-info.json
'
,
'
delete-all
'
:
Fals
e
,
'
delete-all
'
:
Tru
e
,
'
thread-count
'
:
20
,
'
loaders
'
:
[
# {
...
...
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