diff --git a/dags/business/business/apiuser_notice.py b/dags/business/business/apiuser_notice.py index 43c166f..b9425b5 100644 --- a/dags/business/business/apiuser_notice.py +++ b/dags/business/business/apiuser_notice.py @@ -1,6 +1,5 @@ -from goojia_utils import LOG_MONGO_CLIENT +from goojia_utils import LOG_MONGO_CLIENT,dingutils from sqlalchemy import create_engine -from dingtalkchatbot.chatbot import DingtalkChatbot import datetime import pandas as pd @@ -75,12 +74,9 @@ def sendDingDing(text): text = '【Api接口使用提醒】' + text # robot_password = "SECf69d6dc5be4ca7e52b598d7eac75eb2e7d3bd6707c9f0a3ccb3b8a68ecf6f3fc" # robot_webhook = "https://oapi.dingtalk.com/robot/send?access_token=f617e5b73808597d38101393b34c609cbe5353f9ed9a70cabda0b9e6e8ca371e" - robot_password = ""; - robot_webhook = "https://oapi.dingtalk.com/robot/send?access_token=1e25f620ea2be926b2441e4f30d67f37abdff2e14088b03b41b4082b11fc34ea" - # 创建机器人 - robot = DingtalkChatbot(robot_webhook, robot_password) - # 发送消息 - robot.send_text(text) + token = '1e25f620ea2be926b2441e4f30d67f37abdff2e14088b03b41b4082b11fc34ea'; + # 发送钉钉群消息 + dingutils.send_text(text,token) sync()