From 7824d4f38dcb6f21fca7e7df108115e7d2032296 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 18 Sep 2018 00:11:28 +0200 Subject: [PATCH] Uncomment stuff --- statsupdater.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/statsupdater.py b/statsupdater.py index 4d70ca8e..20791b2f 100644 --- a/statsupdater.py +++ b/statsupdater.py @@ -63,24 +63,24 @@ def new_lol_rank(item: db.LeagueOfLegends): def process(): while True: + logger.info("Pausing for 30 minutes.") + time.sleep(1800) session = db.Session() - #logger.info("Now updating Steam data.") - #update_block(session.query(db.Steam).all()) - #session.commit() - #logger.info("Now updating Dota data.") - #update_block(session.query(db.Dota).all(), delay=1, change_callback=new_dota_rank) - #session.commit() - #logger.info("Now updating League of Legends data.") - #update_block(session.query(db.LeagueOfLegends).all(), delay=0.3, change_callback=new_lol_rank) - #session.commit() - #logger.info("Now updating osu! data.") - #update_block(session.query(db.Osu).all(), delay=0.3) - #session.commit() + logger.info("Now updating Steam data.") + update_block(session.query(db.Steam).all()) + session.commit() + logger.info("Now updating Dota data.") + update_block(session.query(db.Dota).all(), delay=1, change_callback=new_dota_rank) + session.commit() + logger.info("Now updating League of Legends data.") + update_block(session.query(db.LeagueOfLegends).all(), delay=0.3, change_callback=new_lol_rank) + session.commit() + logger.info("Now updating osu! data.") + update_block(session.query(db.Osu).all(), delay=0.3) + session.commit() logger.info("Now updating Overwatch data.") update_block(session.query(db.Overwatch).all(), delay=1) session.commit() - logger.info("Pausing for 30 minutes.") - time.sleep(1800) if __name__ == "__main__":