[Erp5-dev] TimerService ip patch and other patches

Marta Kalamar kalamar at beyondsoftware.eu
Fri Oct 19 16:12:43 CEST 2007


Hello everyone,

I've just started using ERP5 (i installed it from scratch from the svn).
Wonderful software, congratulations!

Of course the trunk version didn't work until i had made some patches. 
The most important one I describe below.

Please, tell me:
1. If that will be useful when I post the patches
2. How I am supposed to do that

I'm a newby to ERP5, please somebody introduce me to the rules.


Best Regards,
Marta Kalamar

--------------------------------------------------------------------

The most important patch i had to apply was needed in TimeService since 
it lisens by default at

    ip = socket.gethostbyname(socket.gethostname())

witch is not correct in my case. I think many servers can have more than 
one interface and it should be possible to choose where the TimerServer 
is supposed to listen.
So i added new parameter in timerserver/component.xml

    <key name="ip" datatype="string" default="127.0.0.1">
      <description>
    Interface to listen on.
      </description>
    </key>'

and some lines in TimerServer.py:
   
    def __init__(self, module, interval=600, ip=None):
    (...)
        ip = self.ip
        if ip is None:
            ip = socket.gethostbyname(socket.gethostname())

and in __init__.py:

            self.ip = section.ip
            (...)
    return TimerServer(self.module, self.interval, self.ip)

And now I can specify the IP i want in zope.conf.



 




More information about the Erp5-dev mailing list