def start(self): """ Start fork loop. """ # Load configuration here to make sure that everything for it is loaded self.cfg = getConfiguration() # Must import here because we don't have DB on bootup yet from Globals import DB self.database = IDatabaseHooks(DB) # SIGCHLD tells us that child process has really died and we can spawn # new child registerHandler(signal.SIGCHLD, self._waitChildToDieAndScheduleNew) # With SIGUSR1 child can tell that it dies by request, not by exception # etc. registerHandler(signal.SIGUSR1, self._childIsGoingToDie) self.loop()
def __init__(self, context): self.context = IDatabaseHooks(context.storage)