Пример #1
0
    def create_processes(self):
        self.__output_service = OutputService()
        self.__output_process = Process(target=self.__output_service.start,
                                        args=(self, ))

        self.__effect_service = EffectService()
        self.__effect_process = Process(target=self.__effect_service.start,
                                        args=(self, ))
Пример #2
0
    def refresh_config(self, config, device_config):
        print("Refresh config of device: " +
              self.__device_config["DEVICE_NAME"])

        self.stop_device()

        self.__config = config
        self.__device_config = device_config

        self.create_queues()
        self.create_processes()

        self.__output_service = OutputService()
        self.__output_process = Process(target=self.__output_service.start,
                                        args=(self, ))

        self.__effect_service = EffectService()
        self.__effect_process = Process(target=self.__effect_service.start,
                                        args=(self, ))

        self.start_device()
Пример #3
0
    def refresh_config(self, config, device_config):
        self.logger.info(
            f'Refreshing config of device: {self.__device_config["device_name"]}'
        )

        self.stop_device()

        self.__config = config
        self.__device_config = device_config

        self.create_queues()
        self.create_processes()

        self.__output_service = OutputService()
        self.__output_process = Process(target=self.__output_service.start,
                                        args=(self, ))

        self.__effect_service = EffectService()
        self.__effect_process = Process(target=self.__effect_service.start,
                                        args=(self, ))

        self.start_device()