def start(self): """Start the Server """ JNTServer.start(self) JNTControllerManager.start_controller(self, self.section, self.options, cmd_classes=[COMMAND_UPDATE], hadd=None, name="Raspberry Pi Server", product_name="Raspberry Pi Server", product_type="Raspberry Pi Server") JNTControllerManager.start_controller_timer(self)
def __init__(self, options, check_plateform=False): """ """ #Check that we are on a raspberry if check_plateform==True and not platform.machine().startswith('armv6'): raise JanitooException(message='This server can be used on Raspberry Pi only') JNTServer.__init__(self, options)
def __init__(self, options): """Init the server. Must be called at the begin of the children class. """ JNTServer.__init__(self, options) self.dbengine = None self.dbmaker = None self.dbsession = None self.dbauto_migrate = None self.check_db()
def test_020_server_start(self): #~ self.wipTest("Pass but freeze nosetests") server = None with mock.patch('sys.argv', [self.prog, 'start', '--conf_file=tests/data/test_runner_conf_complete.conf']): options = vars(jnt_parse_args()) server = JNTServer(options) server.start() time.sleep(5) server.stop()
def __init__(self, options): """ """ JNTServer.__init__(self, options) self.mqtt_client = MQTTClient(options=self.options)
def stop(self): """Stop the Server """ JNTControllerManager.stop_controller_timer(self) JNTControllerManager.stop_controller(self) JNTServer.stop(self)
def flush(self): """Flush the server's data to disk """ JNTServer.flush(self)
def stop(self): """Stop the server the server. Must be called at end of the children class """ self.stop_db() JNTServer.stop(self)
def start(self): """Start the server. Must be called at the end of the children class. """ self.start_db() JNTServer.start(self)