mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 21:44:21 +00:00
oops
This commit is contained in:
parent
ddf69a926a
commit
ee3dee75d4
2 changed files with 4 additions and 3 deletions
2
db.py
2
db.py
|
@ -986,7 +986,7 @@ class Halloween(Base):
|
||||||
# LoL last match
|
# LoL last match
|
||||||
lol = session.query(LeagueOfLegends).join(Royal).filter_by(id=self.royal.id).one_or_none()
|
lol = session.query(LeagueOfLegends).join(Royal).filter_by(id=self.royal.id).one_or_none()
|
||||||
if lol is not 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']}")
|
f"?api_key={config['League of Legends']['riot_api_key']}")
|
||||||
if r.status_code != 200:
|
if r.status_code != 200:
|
||||||
raise RequestError("Error in the Halloween LoL check.")
|
raise RequestError("Error in the Halloween LoL check.")
|
||||||
|
|
|
@ -68,8 +68,9 @@ def new_lol_rank(item: db.LeagueOfLegends):
|
||||||
|
|
||||||
def process():
|
def process():
|
||||||
while True:
|
while True:
|
||||||
logger.info("Pausing for 30 minutes.")
|
if not __debug__:
|
||||||
time.sleep(1800)
|
logger.info("Pausing for 30 minutes.")
|
||||||
|
time.sleep(1800)
|
||||||
session = db.Session()
|
session = db.Session()
|
||||||
logger.info("Now updating Halloween data.")
|
logger.info("Now updating Halloween data.")
|
||||||
update_block(session, session.query(db.Halloween).all())
|
update_block(session, session.query(db.Halloween).all())
|
||||||
|
|
Loading…
Reference in a new issue