Compare commits

...

10 Commits
master ... test

Author SHA1 Message Date
root
8c83609a5b a 2021-06-02 10:19:29 +08:00
pengtao
de272df906 Merge branch 'test' of http://git.kingsome.cn/ops/promotion into test 2020-03-25 13:42:18 +08:00
pengtao
d4f41f13f6 add ignore 2019-11-28 10:23:11 +08:00
pengtao
6f713ee8fa fix datetime format 2019-10-30 14:25:38 +08:00
pengtao
b2bdfd786d fix datetime format 2019-10-30 14:25:15 +08:00
root
83f6baf6af fix sort 2019-10-30 14:22:24 +08:00
pengtao
aa00cfdef6 fix datetime format 2019-10-30 14:05:02 +08:00
pengtao
8bb40f1c0a fix datetime format 2019-10-30 14:00:27 +08:00
pengtao
1d997f58a3 fix datetime format 2019-10-29 19:33:23 +08:00
pengtao
ed7927f98f fix area not input 2019-10-28 12:04:54 +08:00
4 changed files with 6 additions and 4 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ Thumbs.db
.pem
test_*
*.pid
.vscode/settings.json

View File

@ -140,7 +140,7 @@ class DispatchHandler(tornado.web.RequestHandler):
input = json.loads(self.get_query_argument('body'))
gameid = input['gameid']
channelid=input.get('channelid',None) or 6001
area=input.get('area',0)
area=input.get('area',None)
locationid = input.get('locationid',0)
except Exception as e:
result = {'errcode': 2, "errmsg": f"get args failed,{str(e)}"}
@ -190,7 +190,8 @@ class DispatchHandler(tornado.web.RequestHandler):
temp = my_redis.hgetall(f"adinfo::{id}::info")
if temp:
info.append(temp)
result = {'errcode': 0, "errmsg": '', "message": {"totoal": len(info), "result": info}}
info_new = sorted(info, key=lambda s: int(s.get('ad_sort', 9999)))
result = {'errcode': 0, "errmsg": '', "message": {"totoal": len(info_new), "result": info_new}}
except Exception as e:
result = {'errcode': 1, "errmsg": e}
return self.write(result)

View File

@ -95,7 +95,7 @@ def produce_task():
for k, v in zip(field, line):
item[k] = v
item['createtime'] = datetime.datetime.strftime(item['createtime'], "%Y-%m-%d %H:%M:%S")
item['createtime'] = datetime.datetime.strftime(item['createtime'], "%Y-%m-%dT%H:%M:%S")
if item:
if item.get('jump_param', "") and (item['ad_property'].find("jump_param") == -1):
try:

View File

@ -30,4 +30,4 @@ api.add_resource(RelushADinfo, '/interface/reflush_adinfo')
if __name__ == '__main__':
app.run(host='0.0.0.0', debug=True, port=priv_i_port)
app.run(host='0.0.0.0', debug=True, port=6015)