README 1.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
This is an unnoficial Zope 2.8 backport of official Zope's ClockServer.

Status of initial checkin compared to official version:
  __init__.py
    Locally created.
  ClockServer.py
    Locally created.
  component.xml
    Fix component prefix.
  datatypes.py
    Import ServerFactory (originaly locally defined).
    Fix ClockServer class import.
  OriginalClockServer.py
    Unchanged original ClockServer.py.
  README
    Locally created.

To enable it, add (and adapt) the following to your zope.conf:
  %import Products.ClockServer
  <clock-server>
    # starts a clock which calls /foo/bar every 30 seconds
    method /foo/bar
    period 30
    user admin
    password 123
  </clock-server>

ERP5 users: You are strongly encouraged to kee TimerService (but to stop using
timerserver) and use the following configuration:

  method /Control_Panel/timer_service/process_timer?interval:int=5
32
  shutdown_method /Control_Panel/timer_service/process_shutdown
33 34 35 36 37 38 39 40 41 42 43 44 45
  period 5

Note: Because ClockServer uses asyncore's "readable" method polling,
configured frequency is only a maximum value. Minimum freqency depends on
asyncore configuration (one wakeup every 30s on my machine). If there is
activity on Zope's sockets, frequency will increase.

This ClockServer is extended (see ClockServer.py) to propagate shutdown
notification to configured method, by pasing it extra parameters.
This allows method to put shutdown sequence on hold (but not interrupt it).
Also, note that it must not be abused: it's both bad to make user wait, and
there are some timeouts killing Zope if it takes too long to stop.