Commit e81a83ab authored by 张彦钊's avatar 张彦钊

change

parent 80a52b52
...@@ -282,7 +282,7 @@ if __name__ == '__main__': ...@@ -282,7 +282,7 @@ if __name__ == '__main__':
spark = SparkSession.builder.config(conf=sparkConf).enableHiveSupport().getOrCreate() spark = SparkSession.builder.config(conf=sparkConf).enableHiveSupport().getOrCreate()
for os in ["ios","android"]: for os in ["ios","android"]:
all_list = [] all_list = []
for i in range(1,27): for i in range(1,3):
date_str = (datetime.date.today() - datetime.timedelta(days=i)).strftime("%Y%m%d") date_str = (datetime.date.today() - datetime.timedelta(days=i)).strftime("%Y%m%d")
tmp_list = [date_str] tmp_list = [date_str]
tmp_list.extend(os_all_click(i,os)) tmp_list.extend(os_all_click(i,os))
......
import redis import redis
import json
import datetime
def make_queue():
native = "58,59,60,61,62,63,64,65"
r.hset(key,"native_queue",native)
nearby = '88,89,90,91,92,93,94,95'
r.hset(key, "nearby_queue", nearby)
nation = '128,129,130,131,132,133,134,135,136,137,138,139'
r.hset(key, "nation_queue", nation)
megacity = '150,151,152,153,154,155,156,157,158,159'
r.hset(key, "megacity_queue", megacity)
def user_portr():
key = 'user_portrait_recommend_diary_queue:device_id:%s:%s' % \
(device_id, datetime.datetime.now().strftime('%Y-%m-%d'))
r.hset(key, "cursor", "0")
r.hset(key, "len_cursor", "0")
r.hset(key, "cpc_queue", json.dumps([58, 59, 60, 61, 62, 63, 64, 65]))
r.hset(key, "diary_queue", json.dumps([88, 89, 90, 91, 92, 93, 94, 95]))
print(r.hgetall(key))
if __name__ == "__main__": if __name__ == "__main__":
topic_key() device_id = "860445048868273"
user_portr()
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