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
Gabriel Monnerat
slapos.core
Commits
c1058afd
Commit
c1058afd
authored
Jun 14, 2013
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent calling instance bang too often when not needed.
parent
a1f378f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
master/product/Vifib/Tool/SlapTool.py
master/product/Vifib/Tool/SlapTool.py
+12
-1
No files found.
master/product/Vifib/Tool/SlapTool.py
View file @
c1058afd
...
...
@@ -931,7 +931,18 @@ class SlapTool(BaseTool):
getAuthenticatedMember
().
getUserName
()
self
.
_logAccess
(
user
,
software_instance
.
getReference
(),
'#error bang called'
)
return
software_instance
.
bang
(
bang_tree
=
True
,
comment
=
message
)
timestamp
=
str
(
int
(
software_instance
.
getModificationDate
()))
key
=
"%s_bangstamp"
%
software_instance
.
getReference
()
result
=
"OK"
transition
=
self
.
getPortalObject
().
portal_workflow
.
getInfoFor
(
software_instance
,
'action'
,
wf_id
=
'instance_slap_interface_workflow'
)
if
(
self
.
_getLastData
(
key
)
!=
timestamp
)
and
\
(
transition
!=
'bang'
):
result
=
software_instance
.
bang
(
bang_tree
=
True
,
comment
=
message
)
self
.
_storeLastData
(
key
,
str
(
int
(
software_instance
.
getModificationDate
())))
return
result
def
_getAccessStatus
(
self
,
context_reference
):
memcached_dict
=
self
.
_getMemcachedDict
()
...
...
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