From 65819a1d6342674a50993c943e2ad1972f870cb6 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 7 Oct 2018 23:22:57 +0200 Subject: [PATCH] asd --- db.py | 3 ++- statsupdate.py | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/db.py b/db.py index 0d3ffa88..2829336d 100644 --- a/db.py +++ b/db.py @@ -953,11 +953,12 @@ class Halloween(Base): session = Session() halloweens = session.query(Halloween).all() session.close() - started = bool(halloweens) completed = [False for _ in range(7)] + started = False for h in halloweens: for i in range(7): if h[i+1]: + started = True completed[i] = True return started, completed diff --git a/statsupdate.py b/statsupdate.py index be2ff4bc..5d5749cc 100644 --- a/statsupdate.py +++ b/statsupdate.py @@ -63,6 +63,10 @@ def new_lol_rank(item: db.LeagueOfLegends): 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(): while True: logger.info("Pausing for 30 minutes.")