Commit 8eed0739 authored by 刘丙寅's avatar 刘丙寅

jenkins调试1

parent 33d20f06
......@@ -8,7 +8,7 @@ def test():
from datetime import date, timedelta
r = redis.Redis()
today = date.today()
today = today + timedelta(days=-3)
# today = today + timedelta(days=-3)
format_today = today.strftime("%Y%m%d")
tomorrow = today + timedelta(days=1)
format_tomorrow = tomorrow.strftime("%Y%m%d")
......@@ -77,21 +77,21 @@ def test():
print(phone_list)
# dd_url = "https://oapi.dingtalk.com/robot/send?access_token=062ab7f98f47c85e6c200efd21ae5d532e4f1bbfd6782ae1268b9a1f4d3dc7b9"
# text = "明日开始休假:休息 %s 天 值班人员为:%s 值班人员记得带 电脑,手机,调通vpn环境" %(number, new_www)
# json_text = {
# "msgtype": "text",
# "at": {
# "atMobiles": phone_list,
# # 变为true 就会@所有人
# "isAtAll": False
# },
# "text": {
# "content": text
# }
# }
#
# requests.post(url=dd_url, json=json_text, verify=False)
dd_url = "https://oapi.dingtalk.com/robot/send?access_token=062ab7f98f47c85e6c200efd21ae5d532e4f1bbfd6782ae1268b9a1f4d3dc7b9"
text = "明日开始休假:休息 %s 天 值班人员为:%s 值班人员记得带 电脑,手机,调通vpn环境" %(number, new_www)
json_text = {
"msgtype": "text",
"at": {
"atMobiles": phone_list,
# 变为true 就会@所有人
"isAtAll": False
},
"text": {
"content": text
}
}
requests.post(url=dd_url, json=json_text, verify=False)
if __name__ == '__main__':
......
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