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)