Commit e8f33725 authored by Jiahang Chen's avatar Jiahang Chen
Browse files

optimize hpr log output

parent b592c14e
Pipeline #515823 passed with stages
in 50 seconds
......@@ -296,7 +296,7 @@ def run_forever(self):
def add_user_def(self, func):
"""Insert user-specified function in the thing object.
:param func: external defined function to be executed.
:param func: external defined function.
"""
self.user_func_list.append(func)
......@@ -396,19 +396,21 @@ def get_last_hpr(hpr_files, is_remove=False):
continue
else:
self.__stanford2010 = _stanford2010
APP_LOGGER.info("Parsing the StanForD2010 Data in DT")
APP_LOGGER.info("Successfully parsed the StanForD2010 Data. File removed from the folder")
break
while is_period:
time.sleep(freq)
hpr_temp = get_last_hpr(hpr_files=get_hpr_files(path), is_remove=is_period)
if hpr_temp is None:
continue
APP_LOGGER.info("Detect new hpr file.")
isotime_old = datetime.fromisoformat(get_timestamp(self.__stanford2010))
isotime_new = datetime.fromisoformat(get_timestamp(hpr_temp))
if isotime_old == isotime_new:
APP_LOGGER.info("Parsing StanForD2020 data failed. File removed from the folder")
continue
else:
APP_LOGGER.info("Update the StanForD2010 data in DT")
APP_LOGGER.info("Successfully parsed the StanForD2010 Data. File removed from the folder")
self.__stanford2010 = hpr_temp
def __config_database(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment