def _change_db_name(cls, rc_data_path: str, old_name: str, new_name: str): if old_name == new_name: return src_path: str = os.path.join(rc_data_path, old_name) dst_path: str = os.path.join(rc_data_path, new_name) try: shutil.move(src_path, dst_path) Logger.info( tag=IISS_LOG_TAG, msg= f"Renaming iiss_db_name succeeded: old={old_name} new={new_name}" ) except BaseException as e: Logger.error( tag=IISS_LOG_TAG, msg= f"Failed to rename iiss_db_name: old={old_name} new={new_name} " f"path={rc_data_path} exception={str(e)}")
def test_error(self): Logger.error(TAG, 'error log')
def earlgrey_close(func: str, exc: Optional[BaseException]): Logger.error(tag="MQ", msg=f"[{func}] connection closed. {exc}") os.killpg(0, signal.SIGKILL)