From 18ee0b05ac7a7e71de9110effdf628fb1b0edbc3 Mon Sep 17 00:00:00 2001 From: "zhaojixiang@fangjia.com" Date: Mon, 10 Jul 2023 17:31:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EAPI=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E6=8F=90=E9=86=92=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dags/business/business/apiuser_notice.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) 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()