def start(self, parent):
self._set_node_uuid()
super(FastDaemon, self).start(parent)
self.vm_status_queue = Queue()
self.vm_status_watcher = Popen(self.SYSEVENT, bufsize=0, close_fds=True, stdout=PIPE, stderr=STDOUT,
preexec_fn=os.setsid)
self.vm_status_monitor_thread = Thread(target=self._vm_status_monitor, name='VMStatusMonitor',
args=(self.vm_status_watcher.stdout,))
self.vm_status_monitor_thread.daemon = True
self.vm_status_monitor_thread.start()
self.vm_status_dispatcher_thread = Thread(target=self._vm_status_dispatcher, name='VMStatusDispatcher')
self.vm_status_dispatcher_thread.daemon = True
self.vm_status_dispatcher_thread.start()
评论列表
文章目录