Commit 0c65a30c authored by 张彦钊's avatar 张彦钊

delete print

parent 16501f87
......@@ -12,7 +12,7 @@ def get_active_users():
sql = "select device_id from user_active_time " \
"where active_time <= '{}' and active_time >= '{}'".format(now_end,now_start)
device_id_df = con_sql(sql)
if device_id_df == 1:
if device_id_df.empty:
print("当下这一分钟没有活跃用户,不需要预测")
# 为了debug supervisor,修改了下面的return参数
return 1,[1,2]
......
......@@ -17,11 +17,7 @@ def con_sql(sql):
print("成功从数据库获取数据")
df = pd.DataFrame(list(result)).dropna()
db.close()
# 为了debug supervisor,加了下面的代码
if df.empty:
return 1
else:
return df
return df
# 把数据写到redis里
# TODO 生产环境的redis地址没有提供,下面的地址是测试环境的,需要改成生产环境地址
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment