1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
This commit is contained in:
Steffo 2018-10-13 13:58:56 +02:00
parent ddf69a926a
commit ee3dee75d4
2 changed files with 4 additions and 3 deletions

2
db.py
View file

@ -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.")

View file

@ -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())