def signal_handler(signum, frame): #we want the handler to run only for the agent process and not #for the children (e.g. namenode, etc.) if os.getpid() != agentPid: os._exit(0) logger.info('signal received, exiting.') ProcessHelper.stopAgent()
def signal_handler(signum, frame): # we want the handler to run only for the agent process and not # for the children (e.g. namenode, etc.) if os.getpid() != agentPid: os._exit(0) logger.info("signal received, exiting.") ProcessHelper.stopAgent()
def signal_handler(signum, frame): #we want the handler to run only for the agent process and not #for the children (e.g. namenode, etc.) if os.getpid() != agentPid: os._exit(0) logger.info('signal received, exiting.') global controller if controller is not None and hasattr(controller, 'actionQueue'): docker_mode = controller.actionQueue.docker_mode if docker_mode: tmpdir = controller.actionQueue.dockerManager.stop_container() ProcessHelper.stopAgent()
def signal_handler(signum, frame): #we want the handler to run only for the agent process and not #for the children (e.g. namenode, etc.) if os.getpid() != agentPid: os._exit(0) logger.info('signal received, exiting.') global controller if controller is not None and hasattr(controller, 'actionQueue') and controller.actionQueue.yarn_docker_mode == False: docker_mode = controller.actionQueue.docker_mode if docker_mode: tmpdir = controller.actionQueue.dockerManager.stop_container() if controller is not None and hasattr(controller, 'stopCommand') and controller.stopCommand is not None: controller.stopCommand = _increment_task_id(controller.stopCommand) controller.appGracefulStopQueued = True controller.actionQueue.execute_command(controller.stopCommand) ProcessHelper.stopAgent()