Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
23
Merge Requests
23
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
5f74af39
Commit
5f74af39
authored
Oct 10, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixup the cache key.
parent
2be40203
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+5
-3
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
5f74af39
...
...
@@ -162,7 +162,8 @@ class SlapTool(BaseTool):
return
xml_marshaller
.
xml_marshaller
.
dumps
(
slap_computer
)
def
_fillComputerInformationCache
(
self
,
computer_id
,
user
,
full
):
self
.
_getCachePlugin
().
set
(
user
,
DEFAULT_CACHE_SCOPE
,
key
=
'%s_%s_%s'
%
(
full
,
computer_id
,
user
)
self
.
_getCachePlugin
().
set
(
key
,
DEFAULT_CACHE_SCOPE
,
dict
(
time
=
time
.
time
(),
data
=
self
.
_getCacheComputerInformation
(
computer_id
,
user
,
full
),
...
...
@@ -193,7 +194,7 @@ class SlapTool(BaseTool):
return
entry
def
_activateFillComputerInformationCache
(
self
,
computer_id
,
user
,
full
):
tag
=
'computer_information_cache_fill_%s
'
%
user
tag
=
'computer_information_cache_fill_%s
_%s_%s'
%
(
computer_id
,
user
,
full
)
if
self
.
getPortalObject
().
portal_activities
.
countMessageWithTag
(
tag
)
==
0
:
self
.
activate
(
activity
=
'SQLQueue'
,
tag
=
tag
).
_fillComputerInformationCache
(
computer_id
,
user
,
full
)
...
...
@@ -211,7 +212,8 @@ class SlapTool(BaseTool):
if
not
self
.
_isTestRun
():
cache_plugin
=
self
.
_getCachePlugin
()
try
:
entry
=
cache_plugin
.
get
(
user
,
DEFAULT_CACHE_SCOPE
)
key
=
'%s_%s_%s'
(
full
,
computer_id
,
user
)
entry
=
cache_plugin
.
get
(
key
,
DEFAULT_CACHE_SCOPE
)
except
KeyError
:
entry
=
None
if
entry
is
not
None
and
type
(
entry
.
getValue
())
==
type
({}):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment