Example #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)
Example #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)
Example #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))
Example #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))
Example #5
0
 def _core_already_running(self):
     return test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME)
Example #6
0
 def _daemon_already_running(self):
     return test_already_running(DAEMON_PID_PATH, DAEMON_BINARY_FILENAME)
Example #7
0
 def _core_already_running(self):
     return test_already_running(CORE_PID_PATH, CORE_BINARY_FILENAME)
Example #8
0
 def _daemon_already_running(self):
     return test_already_running(DAEMON_PID_PATH, DAEMON_BINARY_FILENAME)