新增消息发送
This commit is contained in:
@@ -5,7 +5,7 @@ import pandas as pd
|
|||||||
from goojia_utils import dateutils, ClickHouseClient
|
from goojia_utils import dateutils, ClickHouseClient
|
||||||
import datetime
|
import datetime
|
||||||
import sys
|
import sys
|
||||||
import numpy as np
|
import requests
|
||||||
|
|
||||||
path = "/home/airflow/data/mt"
|
path = "/home/airflow/data/mt"
|
||||||
|
|
||||||
@@ -109,6 +109,19 @@ def up_to_nextcloud():
|
|||||||
nxc.upload_file(path + '/FJW_COMM_' + output_date + ".csv", '共享/美团/FJW_COMM_' + output_date + ".csv")
|
nxc.upload_file(path + '/FJW_COMM_' + output_date + ".csv", '共享/美团/FJW_COMM_' + output_date + ".csv")
|
||||||
|
|
||||||
|
|
||||||
|
def send_msg():
|
||||||
|
infos = "【数据生成完毕】当月数据及覆盖率统计已生成完毕,请点击 https://nextcloud.fangjia.com/s/tMRPHrF8sgGF2F5 查看详情"
|
||||||
|
data = {
|
||||||
|
"msgtype": "text",
|
||||||
|
"text": {
|
||||||
|
"content": infos
|
||||||
|
}
|
||||||
|
}
|
||||||
|
# 发送消息至群
|
||||||
|
requests.post(
|
||||||
|
url='https://oapi.dingtalk.com/robot/send?access_token=e022515642e544942f86bbe234448edc3b8bddea8184e63b7edf4129b31c8e79',
|
||||||
|
json=data)
|
||||||
|
|
||||||
up_to_nextcloud()
|
up_to_nextcloud()
|
||||||
save2_clickhouse()
|
save2_clickhouse()
|
||||||
# https://oapi.dingtalk.com/robot/send?access_token=e022515642e544942f86bbe234448edc3b8bddea8184e63b7edf4129b31c8e79
|
send_msg()
|
||||||
Reference in New Issue
Block a user