1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00
This commit is contained in:
Steffo 2018-10-07 23:22:57 +02:00
parent f82ff533d2
commit 65819a1d63
2 changed files with 6 additions and 1 deletions

3
db.py
View file

@ -953,11 +953,12 @@ class Halloween(Base):
session = Session() session = Session()
halloweens = session.query(Halloween).all() halloweens = session.query(Halloween).all()
session.close() session.close()
started = bool(halloweens)
completed = [False for _ in range(7)] completed = [False for _ in range(7)]
started = False
for h in halloweens: for h in halloweens:
for i in range(7): for i in range(7):
if h[i+1]: if h[i+1]:
started = True
completed[i] = True completed[i] = True
return started, completed return started, completed

View file

@ -63,6 +63,10 @@ def new_lol_rank(item: db.LeagueOfLegends):
logger.warning(f"Couldn't notify on Telegram: {item}") logger.warning(f"Couldn't notify on Telegram: {item}")
def halloween_checks(item: db.Halloween, session: db.Session):
# Dota last matches
session.query(db.Dota).join(db.Steam).filter_by(id=item.royal).one_or_none()
def process(): def process():
while True: while True:
logger.info("Pausing for 30 minutes.") logger.info("Pausing for 30 minutes.")