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
372a0377
Commit
372a0377
authored
Nov 19, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bugs in check for working in a session.
parent
c1077eef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+4
-3
lib/python/App/CacheManager.py
lib/python/App/CacheManager.py
+7
-4
No files found.
lib/python/App/ApplicationManager.py
View file @
372a0377
__doc__
=
"""Application management component"""
__version__
=
'$Revision: 1.1
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
4
$'
[
11
:
-
2
]
import
sys
,
os
,
time
,
Globals
...
...
@@ -8,8 +8,9 @@ from Acquisition import Acquirer
from
Management
import
Management
from
Globals
import
HTMLFile
from
CacheManager
import
CacheManager
from
Persistence
import
Persistent
class
ApplicationManager
(
Acquirer
,
Management
,
CacheManager
):
class
ApplicationManager
(
Persistent
,
Acquirer
,
Management
,
CacheManager
):
"""Application management component."""
__roles__
=
[
'manage'
,]
...
...
@@ -64,7 +65,7 @@ class ApplicationManager(Acquirer,Management,CacheManager):
def
manage_pack
(
self
,
days
=
0
,
REQUEST
):
"""Pack the database"""
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
:
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
raise
'Session Error'
,
(
'''You may not pack the application database while
working in a <em>session</em>'''
)
...
...
lib/python/App/CacheManager.py
View file @
372a0377
...
...
@@ -58,8 +58,8 @@
__doc__
=
'''Cache management support
$Id: CacheManager.py,v 1.
2 1997/11/07 17:06:02
jim Exp $'''
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
$Id: CacheManager.py,v 1.
3 1997/11/19 20:11:48
jim Exp $'''
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
import
Globals
import
time
...
...
@@ -79,7 +79,7 @@ class CacheManager:
def
cache_age
(
self
):
return
self
.
_cache_age
def
manage_cache_age
(
self
,
value
,
REQUEST
):
"set cache age"
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
:
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
raise
'Session Error'
,
(
'''You may not change the database cache age
while working in a <em>session</em>'''
)
...
...
@@ -89,7 +89,7 @@ class CacheManager:
def
cache_size
(
self
):
return
self
.
_cache_size
def
manage_cache_size
(
self
,
value
,
REQUEST
):
"set cache size"
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
:
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
raise
'Session Error'
,
(
'''You may not change the database cache size
while working in a <em>session</em>'''
)
...
...
@@ -136,6 +136,9 @@ class CacheManager:
##############################################################################
#
# $Log: CacheManager.py,v $
# Revision 1.3 1997/11/19 20:11:48 jim
# Fixed bugs in check for working in a session.
#
# Revision 1.2 1997/11/07 17:06:02 jim
# added session checks.
#
...
...
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