コード例 #1
0
ファイル: hap2_fluentd.py プロジェクト: VaporFan/hatohol
 def __fluentd_manager_main(self):
     while True:
         try:
             self.__fluentd_manager_main_in_try_block()
         except:
             haplib.handle_exception()
             time.sleep(self.__ms_info.retry_interval_sec)
コード例 #2
0
 def __fluentd_manager_main(self):
     while True:
         try:
             self.__fluentd_manager_main_in_try_block()
         except:
             haplib.handle_exception()
             time.sleep(self.__ms_info.retry_interval_sec)
コード例 #3
0
ファイル: hap2_fluentd.py プロジェクト: VaporFan/hatohol
 def __parse_line(self, line):
     try:
         header, msg = line.split(": ", 1)
         timestamp, tag = self.__parse_header(header)
     except:
         timestamp, tag, msg = None, None, None
         haplib.handle_exception()
     return timestamp, tag, msg
コード例 #4
0
 def __parse_line(self, line):
     try:
         header, msg = line.split(": ", 1)
         timestamp, tag = self.__parse_header(header)
     except:
         timestamp, tag, msg = None, None, None
         haplib.handle_exception()
     return timestamp, tag, msg
コード例 #5
0
    def __call__(self):
        while True:
            try:
                self.__run()
            except:
                raises = (KeyboardInterrupt, AssertionError, SystemExit)
                exctype, value = haplib.handle_exception(raises=raises)
            else:
                break

            self.enable_handling_sigchld(False)
            if self.__main_plugin is not None:
                self.__main_plugin.destroy()
                self.__main_plugin = None
            if self.__poller is not None:
                self.__poller.terminate()
                self.__poller = None

            logging.info("Rerun after %d sec" % self.__error_sleep_time)
            time.sleep(self.__error_sleep_time)