diff --git a/db.py b/db.py index 1d857b67..9f2dc291 100644 --- a/db.py +++ b/db.py @@ -986,7 +986,7 @@ class Halloween(Base): # LoL last match lol = session.query(LeagueOfLegends).join(Royal).filter_by(id=self.royal.id).one_or_none() if lol is not None: - r = requests.get(f"https://euw1.api.riotgames.com/lol/match/v3/matchlists/by-account/207525171" + r = requests.get(f"https://euw1.api.riotgames.com/lol/match/v3/matchlists/by-account/{lol.account_id}" f"?api_key={config['League of Legends']['riot_api_key']}") if r.status_code != 200: raise RequestError("Error in the Halloween LoL check.") diff --git a/statsupdate.py b/statsupdate.py index e184d6af..92ac335c 100644 --- a/statsupdate.py +++ b/statsupdate.py @@ -68,8 +68,9 @@ def new_lol_rank(item: db.LeagueOfLegends): def process(): while True: - logger.info("Pausing for 30 minutes.") - time.sleep(1800) + if not __debug__: + logger.info("Pausing for 30 minutes.") + time.sleep(1800) session = db.Session() logger.info("Now updating Halloween data.") update_block(session, session.query(db.Halloween).all())