Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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()
Пример #4
0
 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()
Пример #5
0
 def __init__(self, options):
     """
     """
     JNTServer.__init__(self, options)
     self.mqtt_client = MQTTClient(options=self.options)
Пример #6
0
 def stop(self):
     """Stop the Server
     """
     JNTControllerManager.stop_controller_timer(self)
     JNTControllerManager.stop_controller(self)
     JNTServer.stop(self)
Пример #7
0
 def flush(self):
     """Flush the server's data to disk
     """
     JNTServer.flush(self)
Пример #8
0
 def stop(self):
     """Stop the server the server. Must be called at end of the children class
     """
     self.stop_db()
     JNTServer.stop(self)
Пример #9
0
 def start(self):
     """Start the server. Must be called at the end of the children class.
     """
     self.start_db()
     JNTServer.start(self)
Пример #10
0
 def __init__(self, options):
     """
     """
     JNTServer.__init__(self, options)
     self.mqtt_client = MQTTClient(options=self.options)