Commit e9789cd3 authored by lixiaofang's avatar lixiaofang

add

parent 21c2c19a
......@@ -14,20 +14,16 @@ from physical.settings_local import DATABASES
from physical.settings_local import REDIS_URL
from vest.data.topic_models import get_pictorial_tag_by_id, get_topic_product_info, get_edit_tag_id_list, \
get_category_tag_id, topic_has_image
from django.conf import settings
my_sender = 'lixiaofang@igengmei.com'
my_pass = 'tg5AVKBB8jLQGBET'
my_user6 = "lixiaofang@igengmei.com"
auto_click_url = "http://earth.gmapp.env/api/v1/like"
auto_reply_url = "http://earth.gmapp.env/api/v1/reply/create"
auto_follow_url = "http://earth.gmapp.env/api/v1/follow"
auto_urge_url = "http://earth.gmapp.env/api/v1/user/urge"
# auto_click_url = "http://earth.iyanzhi.com/api/v1/like"
# auto_reply_url = "http://earth.iyanzhi.com/api/v1/reply/create"
# auto_follow_url = "http://earth.iyanzhi.com/api/v1/follow"
# auto_urge_url = "http://earth.iyanzhi.com/api/v1/user/urge"
auto_click_url = settings.auto_click_url
auto_reply_url = settings.auto_reply_url
auto_follow_url = settings.auto_follow_url
auto_urge_url = settings.auto_urge_url
host = DATABASES['default']['HOST']
......@@ -318,7 +314,7 @@ def send_email(stat_data):
msg = MIMEText(stat_data, 'plain', 'utf-8')
msg['From'] = formataddr(["李小芳", my_sender])
msg["To"] = formataddr(["李小芳", my_user6])
msg['Subject'] = str(datetime.date.today()) + "like的线上环境的自动点赞出问题了"
msg['Subject'] = str(datetime.date.today()) + "like的" + str(settings.service_name) + "环境的自动点赞出问题了"
server = smtplib.SMTP_SSL("smtp.exmail.qq.com", 465)
server.login(my_sender, my_pass)
server.sendmail(my_sender, [my_user6], msg.as_string())
......
......@@ -4,14 +4,12 @@ import logging
import json
from libs.cache import redis_client
from libs.error import logging_exception
login_url = "http://earth.iyanzhi.com/api/account/login_pwd"
# login_url = "http://earth.gmapp.env/api/account/login_pwd"
from django.conf import settings
def index_first():
try:
r1 = requests.get(login_url)
r1 = requests.get(settings.login_url)
return r1.cookies.get_dict()
except:
logging.error("index_first:%s" % traceback.format_exc())
......@@ -33,7 +31,7 @@ def get_cook():
'email': i
}
response = requests.post(
url=login_url,
url=settings.login_url,
data=post_dict,
cookies=cookies
)
......
......@@ -9,8 +9,8 @@ from libs.cache import redis_client
from vest.request.auto_request import get_offline_comment
from vest.request.auto_request import host, user, db, passwd
from libs.error import logging_exception
from django.conf import settings
auto_reply_url = "http://saturn.iyanzhi.com/api/v1/reply/create_for_inner"
def reply(id, content, user_id):
......@@ -21,7 +21,7 @@ def reply(id, content, user_id):
'content': content,
"type": 4
}
response = requests.post(url=auto_reply_url,
response = requests.post(url=settings.auto_inner_reply_url,
data=post_dict)
logging.info("response.text:%s" % response.text)
......
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