def restore_old_users_data_process(): dump_date = get_dump_date(MYSQL, ARCHIVES_BASE_FOLDER) previous_mysql_dump_date = get_previous_dump_date(MYSQL, ARCHIVES_BASE_FOLDER) db_name = f"{GHTORRENT}-{previous_mysql_dump_date}" if dump_date != previous_mysql_dump_date: mysql = MySQL(f"{dump_date}") mysql.update_users(db_name) mysql.commit() mysql.disconnect()
def update_mysql_process(): dump_date = get_dump_date(MONGO, ARCHIVES_BASE_FOLDER) if is_dump_date_valid(dump_date): previous_mysql_dump_date = get_previous_dump_date( MYSQL, ARCHIVES_BASE_FOLDER) mysql = MySQL(previous_mysql_dump_date) db_name = f"{GHTORRENT}-{USERS_TEMP}" mysql.update_users(db_name) mysql.commit() mysql.disconnect()