fix: 修改数据库连接地址

This commit is contained in:
chenwj113 2023-05-21 21:22:05 +08:00
parent efc52dbcdf
commit 95b41b25b9
2 changed files with 5 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class Lottery(object):
raise Exception("未知的lottery_type") raise Exception("未知的lottery_type")
def _get_db_session(self): 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) _DbSession = sessionmaker(bind=_engine)
return _DbSession() return _DbSession()

View File

@ -46,6 +46,10 @@ def plw_job():
def sd_job(): def sd_job():
get_data_job(lottery_type='sd') get_data_job(lottery_type='sd')
@repeat(every().day.at("21:30"))
def print_hello():
print("hello at: 21:30")
while True: while True:
run_pending() run_pending()
time.sleep(1) time.sleep(1)