Hi,
I am following Daniel's advise
Consider controlling the server directly using
our
python wrapper:
in trying to get more transactional rigour through the Python library
from Git. The library certainly is easier to integrate!
But I think I hit upon a bug. The code
def __init__ (self, socketpath='/var/run/knot/knot.sock'):
"""Connect to knotd
"""
self.ctl = None
self.txn_conf = False
self.txn_zone = set ()
self.txn_success = True
self.ctl = libknot.control.KnotCtl ()
self.ctl.connect (socketpath)
self.ctl.set_timeout (3600)
seems to not set any timeout; it always cuts off after 5s sleep, and
never after 4s sleep. This is true for the first command as well as
later ones. Same when setting the timeout to 7200, so it's not a ms/s
issue.
This code is almost literally the same as in StatsServer, except that
demo runs too fast to detect timeout problems. I ran into it when
working interactively.
Ideally, I would want to disable connection timeouts altogether, so it
is possible to abort any open transactions upon whatever cause for
termination there might be; this should benefit stability.
-Rick