Commit baa18866 authored by Tres Seaver's avatar Tres Seaver

- Collector #1661: wire up 'python-check-interval'.

parent 0fa21285
...@@ -51,6 +51,10 @@ Zope Changes ...@@ -51,6 +51,10 @@ Zope Changes
Bugs fixed Bugs fixed
- Collector #1661: make 'python-check-interval' setting in zope.conf
actually work as documented. This setting allows for important
tuning opportunities for production Zope servers.
- Collector #1657: Don't break host-based virtual hosting when - Collector #1657: Don't break host-based virtual hosting when
purging an HTTP accelerator. purging an HTTP accelerator.
......
...@@ -94,6 +94,7 @@ class ZopeStarter: ...@@ -94,6 +94,7 @@ class ZopeStarter:
self.dropPrivileges() self.dropPrivileges()
self.makeLockFile() self.makeLockFile()
self.makePidFile() self.makePidFile()
self.setupInterpreter()
self.startZope() self.startZope()
self.registerSignals() self.registerSignals()
# emit a "ready" message in order to prevent the kinds of emails # emit a "ready" message in order to prevent the kinds of emails
...@@ -306,6 +307,10 @@ class ZopeStarter: ...@@ -306,6 +307,10 @@ class ZopeStarter:
except OSError: except OSError:
pass pass
def setupInterpreter(self):
""" make changes to the python interpreter environment """
sys.setcheckinterval(self.cfg.python_check_interval)
class WindowsZopeStarter(ZopeStarter): class WindowsZopeStarter(ZopeStarter):
......
...@@ -356,6 +356,22 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase): ...@@ -356,6 +356,22 @@ class ZopeStarterTestCase(test_logger.LoggingTestBase):
starter.unlinkPidFile() starter.unlinkPidFile()
self.failIf(os.path.exists(name)) self.failIf(os.path.exists(name))
def testConfigureInterpreter(self):
import sys
oldcheckinterval = sys.getcheckinterval()
newcheckinterval = oldcheckinterval + 1
conf = self.load_config_text("""
instancehome <<INSTANCE_HOME>>
python-check-interval %d
""" % newcheckinterval
)
try:
starter = self.get_starter(conf)
starter.setupInterpreter()
self.failUnlessEqual( sys.getcheckinterval() , newcheckinterval )
finally:
sys.setcheckinterval(oldcheckinterval)
def testZopeRunConfigure(self): def testZopeRunConfigure(self):
old_config = getConfiguration() old_config = getConfiguration()
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment