Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"app-" + self.config.application.id,
"IPC",
self.config,
nethelper.get_free_port([module_port]),
app_helpers._KerviSocketIPC
)
]
for module in self.config.modules:
self._process_info_lock.acquire()
self._process_info += [{"id":module, "ready":False}]
self._process_info_lock.release()
module_port += 1
self._module_processes += [
process._start_process(
"app-" + self.config.application.id,
module,
self.config,
nethelper.get_free_port([module_port]),
app_helpers._KerviModuleLoader
)
]
# if self.config.routing.kervi_io.enabled:
# module_port += 1
# self._module_processes += [
# process._start_process(
# "app-" + self.config.application.id,
# "kervi_io",
# self.config,
# nethelper.get_free_port([module_port]),
self._process_info_lock.release()
module_port = self.config.network.ipc_module_port
module_port = pluginManager.load_plugins(module_port+1)
for module in self.config.modules:
module_port += 1
self._process_info_lock.acquire()
self._process_info += [{"id":module, "ready":False}]
self._process_info_lock.release()
self._module_processes += [
process._start_process(
"module-" + self.config.module.ip,
module,
self.config,
nethelper.get_free_port([module_port]),
app_helpers._KerviModuleLoader,
process_id=self.config.module.id + "-" + module
)
]
while not self._is_ready():
time.sleep(1)
self._logger.info("module connected to application at: %s", self._root_address)
self._logger.info("Press ctrl + c to stop your module")
self.spine.trigger_event(
"moduleReady",