From 95b41b25b9c29850fe6974194ab4ce9604f74299 Mon Sep 17 00:00:00 2001 From: chenwj113 Date: Sun, 21 May 2023 21:22:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=BF=9E=E6=8E=A5=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lottery/__init__.py | 2 +- main.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lottery/__init__.py b/lottery/__init__.py index a0907c8..d34d790 100644 --- a/lottery/__init__.py +++ b/lottery/__init__.py @@ -32,7 +32,7 @@ class Lottery(object): raise Exception("未知的lottery_type") def _get_db_session(self): - _engine = create_engine("mysql+pymysql://test:123456@172.17.0.1/lottery?charset=utf8", pool_pre_ping=True, pool_recycle=3600) + _engine = create_engine("mysql+pymysql://root:Chenweijia113!@172.17.0.1/lottery?charset=utf8", pool_pre_ping=True, pool_recycle=3600) _DbSession = sessionmaker(bind=_engine) return _DbSession() diff --git a/main.py b/main.py index 20ce441..3a921ce 100644 --- a/main.py +++ b/main.py @@ -46,6 +46,10 @@ def plw_job(): def sd_job(): get_data_job(lottery_type='sd') +@repeat(every().day.at("21:30")) +def print_hello(): + print("hello at: 21:30") + while True: run_pending() time.sleep(1)