Commit 7ce18a69 authored by lixiaofang's avatar lixiaofang

添加日志

parent 1c526821
......@@ -20,7 +20,7 @@ def click(card_info):
redis_data = {"click": 1, "follow": 0, "comment": 0}
redis_client.set(key, json.dumps(redis_data))
redis_client.expire(key, time=24 * 60 * 60)
logging.info("get action:click,card_id:%s,redis_data:%s" % (card_info['id'], redis_data))
logging.info("get action:click,card_id:%s,redis_data:%s" % (card_info['card_id'], redis_data))
click_num = redis_data["click"]
if click_num > 10:
send_email_tome(str(redis_data) + str(card_info))
......
......@@ -20,7 +20,7 @@ def comment(card_info):
redis_data = {"click": 0, "follow": 0, "comment": 1}
redis_client.set(key, json.dumps(redis_data))
redis_client.expire(key, time=24 * 60 * 60)
logging.info("get action:comment,card_id:%s,redis_data:%s" % (card_info['id'], redis_data))
logging.info("get action:comment,card_id:%s,redis_data:%s" % (card_info['card_id'], redis_data))
comment_num = redis_data["comment"]
####在这里做判断 一天不能超过20个 如果超过二十个不下发 不超过二十个下发对应的灌水功能
if comment_num > 20:
......
......@@ -20,7 +20,7 @@ def follow(card_info):
redis_data = {"click": 0, "follow": 1, "comment": 0}
redis_client.set(key, json.dumps(redis_data))
redis_client.expire(key, time=24 * 60 * 60)
logging.info("get action:follow,card_id:%s,redis_data:%s" % (card_info['id'], redis_data))
logging.info("get action:follow,card_id:%s,redis_data:%s" % (card_info['card_id'], redis_data))
follow_num = redis_data["follow"]
......
/Users/lxrent/vest_gm/lib/python3.6/site-packages/django/core/management/base.py:265: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
RemovedInDjango110Warning)
/Users/lxrent/vest_gm/lib/python3.6/site-packages/django/core/management/base.py:265: RemovedInDjango110Warning: OptionParser usage for Django management commands is deprecated, use ArgumentParser instead
RemovedInDjango110Warning)
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