Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
2e87ae55
Commit
2e87ae55
authored
Nov 07, 2001
by
matt@zope.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify reset to call delete notification on all entries if _ring exists.
parent
bccc33e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
lib/python/Products/Transience/Transience.py
lib/python/Products/Transience/Transience.py
+10
-2
No files found.
lib/python/Products/Transience/Transience.py
View file @
2e87ae55
...
...
@@ -85,10 +85,10 @@
"""
Core session tracking SessionData class.
$Id: Transience.py,v 1.
9 2001/11/07 06:46:36 chrism
Exp $
$Id: Transience.py,v 1.
10 2001/11/07 20:13:16 matt
Exp $
"""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
import
Globals
from
Globals
import
HTMLFile
,
MessageDialog
...
...
@@ -267,6 +267,7 @@ class TransientObjectContainer(SimpleItem):
def
setAddNotificationTarget
(
self
,
f
):
# We should assert that the callback function 'f' implements
# the TransientNotification interface
print
"setting addNotificationTarget to %s"
%
f
self
.
_addCallback
=
f
security
.
declareProtected
(
MGMT_SCREEN_PERM
,
'getDelNotificationTarget'
)
...
...
@@ -278,6 +279,7 @@ class TransientObjectContainer(SimpleItem):
def
setDelNotificationTarget
(
self
,
f
):
# We should assert that the callback function 'f' implements
# the TransientNotification interface
print
"setting delNotificationTarget to %s"
%
f
self
.
_delCallback
=
f
...
...
@@ -369,6 +371,12 @@ class TransientObjectContainer(SimpleItem):
self
.
_timeout_secs
=
timeout_mins
*
60
def
_reset
(
self
):
if
hasattr
(
self
,
'_ring'
):
for
k
in
self
.
keys
():
self
.
notifyDestruct
(
self
[
k
])
del
self
[
k
]
t_secs
=
self
.
_timeout_secs
r_secs
=
self
.
_resolution_secs
=
int
(
t_secs
*
self
.
_err_margin
)
or
1
numbuckets
=
int
(
math
.
floor
(
t_secs
/
r_secs
))
or
1
...
...
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