优化均价算法
This commit is contained in:
@@ -5,6 +5,8 @@ import config
|
||||
import pytz
|
||||
import datetime
|
||||
import calendar
|
||||
import requests
|
||||
import json
|
||||
from fangjia import mongoClients as mongoClients
|
||||
from fangjia import ElasticsearchClient as es
|
||||
|
||||
@@ -90,6 +92,21 @@ def get_weekend():
|
||||
return pacific.localize(now)
|
||||
|
||||
|
||||
def send_ding_msg(msg):
|
||||
headers = {
|
||||
'Content-Type': "application/json",
|
||||
}
|
||||
url = "https://oapi.dingtalk.com/robot/send" \
|
||||
"?access_token=2307d2fec8314b3e8b4b83dd1d42da2e2051638e3e668f21e77ca01258bf682c"
|
||||
|
||||
text_body = {
|
||||
"msgtype": "text",
|
||||
"text": {
|
||||
"content": msg
|
||||
}
|
||||
|
||||
}
|
||||
requests.request("POST", url, data=json.dumps(text_body, ensure_ascii=False).encode('utf8'), headers=headers)
|
||||
|
||||
|
||||
@timer
|
||||
|
||||
Reference in New Issue
Block a user