python - Airflow - 松弛通知。当我的程序使用 Airflow 失败时,我正在尝试配置松弛通知

标签 python notifications airflow slack

当我运行该程序时,我收到一条“broken dag no name module slackclient”。我检查了我的代码并设置了我的 slack 帐户。

我也包含了必要的包

from slackclient import SlackClient
from airflow.operators.slack_operator import SlackAPIPostOperator

failed_alert = SlackAPIPostOperator(
         task_id='shdfs',
         channel="#data",
         token="shdfgsdjh324353243brsrbewr3243",
         user= 'usr',
         text = "hi,this is notification"  )

我错过了什么吗?请告诉我。提前致谢!

最佳答案

运行以下命令并安装 slack 依赖项,然后重试。

pip install apache-airflow[slack]

关于python - Airflow - 松弛通知。当我的程序使用 Airflow 失败时,我正在尝试配置松弛通知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53098806/

相关文章:

iphone - Apple 推送通知服务器 - 反馈始终返回零元组

php - 如何使用 PHP 和 Jquery 开发像 facebook 这样的警报系统?

bash - Airflow 参数传递

Airflow 2.0.1 : Write logs in Local Timezone

python - Airflow 依赖于过去的解释

python - AWS API 网关 + SQS + Lambda + 将响应从 Lambda 返回到 API

python - 如何使这个变化的数据框更快?

android - 为 Android 设置 "smallIcon"

python3 (nltk/numpy/等) : ISO efficient way to compute find pairs of similar strings

python - Google Drive API 的刷新 token 何时到期?