Beispiel #1
0
    def notify_monitor_stop_event(self):
        """
        Method:    notify_monitor_stop_event
        Description: 通知monitor当前进程将要停止了
        Parameter: 无
        Return: 
        Others: 
        """

        if not self._is_need_shake_with_monitor():
            return

        if self.__ipc_send_work is None:
            return 
            
        try:
            frame = AppFrame()
            frame.set_cmd_code(local_cmd_code.CMD_SHAKEHAND_WITH_MONITOR)
            frame.add_data(self._instance_name)
            frame.add_data(BasicApp.SHAKEHAND_STOPPING)    
            frame.set_receiver_pid(self.get_pid("Monitor", local_const_def.ONLYLOCAL_PID))  
            self.dispatch_frame_to_process_by_pid(frame.get_receiver_pid(), frame)
        except:
            tracelog.exception("notify_monitor_stop_event failed.")