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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos.core
Commits
ee10fae2
Commit
ee10fae2
authored
Oct 11, 2012
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
YAH: Yet another hack.
parent
24986ef9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+15
-9
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
ee10fae2
...
...
@@ -178,15 +178,21 @@ class SlapTool(BaseTool):
def
_fillComputerInformationCache
(
self
,
computer_id
,
user
,
full
):
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
),
),
cache_duration
=
self
.
getPortalObject
().
portal_caches
\
.
getRamCacheRoot
().
get
(
'computer_information_cache_factory'
\
).
cache_duration
)
try
:
self
.
_getCachePlugin
().
set
(
key
,
DEFAULT_CACHE_SCOPE
,
dict
(
time
=
time
.
time
(),
data
=
self
.
_getCacheComputerInformation
(
computer_id
,
user
,
full
),
),
cache_duration
=
self
.
getPortalObject
().
portal_caches
\
.
getRamCacheRoot
().
get
(
'computer_information_cache_factory'
\
).
cache_duration
)
except
Unauthorized
:
# XXX: Hack. Race condition of not ready setup delivery which provides
# security information shall not make this method fail, as it will be
# called later anyway
pass
def
_storeLastData
(
self
,
key
,
value
):
cache_plugin
=
self
.
getPortalObject
().
portal_caches
\
...
...
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