Commit 8f3b7751 authored by Julien Muchembled's avatar Julien Muchembled

Force use of the new TimerServer

By importing the new TimerService unconditionally,
the commit 34c81caf
(Timeout: introduce publisher_timeout configuration)
broke automatic site creation & publisher timeout
when the zope config specifies the old timerserver.
parent bbb46d26
......@@ -2485,16 +2485,7 @@ def initialize(self):
'MySQL error while trying to create ERP5 site. Retrying...',
TimerServer = sys.modules['Products.TimerService.timerserver.TimerServer']
except KeyError:
try: # BBB
TimerServer = sys.modules['timerserver.TimerServer']
except KeyError:
# There's no point installing ERP5 automatically
# if there's no timer service configured.
TimerRequest = TimerServer.TimerRequest
from Products.TimerService.timerserver.TimerServer import TimerRequest
def traverse(*args, **kw):
del TimerRequest.traverse
return addERP5Site
......@@ -2,6 +2,7 @@
# -*- Mode: Python; py-indent-offset: 4 -*-
# Authors: Nik Kim <>
import sys
from App.ImageFile import ImageFile
from .TimerService import TimerService, current_version
......@@ -25,3 +26,13 @@ def getTimerService(context):
root._setObject(cp_id, timer_service)
return timer_service
old = sys.modules['timerserver']
except KeyError:
else: # BBB: old timerserver loaded from zope config, force use of new one
assert 'timerserver.TimerServer' not in sys.modules
from .timerserver import TimerServerFactory
old.TimerServerFactory.create = TimerServerFactory.create.__func__
del old, TimerServerFactory
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