Exemplo n.º 1
0
 def watchdog(self):
     # Watchdog wait for event core_start_ready before starting
     Events.core_start_ready.wait()
     log.debug('Core: watchdog will now start')
     while True:
         # TODO Use ping to core_client
         # TODO Try to use self.process to check if running
         if not test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME):
             self.start()
         gevent.sleep(CORE_WATCHDOG_PERIOD)
Exemplo n.º 2
0
 def watchdog(self):
     # Watchdog wait for event core_start_ready before starting
     Events.core_start_ready.wait()
     log.debug('Core: watchdog will now start')
     while True:
         # TODO Use ping to core_client
         # TODO Try to use self.process to check if running
         if not test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME):
             self.start()
         gevent.sleep(CORE_WATCHDOG_PERIOD)
Exemplo n.º 3
0
 def stop_by_pid(self):
     pid = test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME)
     if pid:
         os.kill(pid, signal.SIGTERM)
         log.debug('Core: Killed core running with pid {0}'.format(pid))
Exemplo n.º 4
0
 def stop_by_pid(self):
     pid = test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME)
     if pid:
         os.kill(pid, signal.SIGTERM)
         log.debug('Core: Killed core running with pid {0}'.format(pid))
Exemplo n.º 5
0
 def _core_already_running(self):
     return test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME)
Exemplo n.º 6
0
 def _daemon_already_running(self):
     return test_already_running(DAEMON_PID_PATH, DAEMON_BINARY_FILENAME)
Exemplo n.º 7
0
 def _core_already_running(self):
     return test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME)
Exemplo n.º 8
0
 def _daemon_already_running(self):
     return test_already_running(DAEMON_PID_PATH, DAEMON_BINARY_FILENAME)