Esempio n. 1
0
    def Stop(self, request, context):
        """RadioStation을 종료한다.

        :param request: StopRequest
        :param context:
        :return: StopReply
        """
        logging.info('RadioStation will stop... by: ' + request.reason)
        ObjectManager().rs_service.common_service.stop()
        return loopchain_pb2.StopReply(status="0")
Esempio n. 2
0
    def Stop(self, request, context):
        """Peer를 중지시킨다

        :param request: 중지요청
        :param context:
        :return: 중지결과
        """
        if request is not None:
            logging.info('Peer will stop... by: ' + request.reason)

        try:
            response = self.peer_service.channel_manager.stop_score_containers(
            )
            logging.debug("try stop score container: " + str(response))
        except Exception as e:
            logging.debug("Score Service Already stop by other reason. %s", e)

        self.peer_service.service_stop()
        return loopchain_pb2.StopReply(status="0")
Esempio n. 3
0
    def Stop(self, request, context):
        """Peer를 중지시킨다

        :param request: 중지요청
        :param context:
        :return: 중지결과
        """
        if request is not None:
            logging.info('Peer will stop... by: ' + request.reason)

        try:
            # process monitor must stop monitoring before any subprocess stop
            Monitor().stop()

            for channel_name in self.peer_service.channel_infos:
                channel_stub = StubCollection().channel_stubs[channel_name]
                channel_stub.sync_task().stop()

            self.peer_service.service_stop()

        except Exception as e:
            logging.debug("Score Service Already stop by other reason. %s", e)

        return loopchain_pb2.StopReply(status="0")