From 5122cee14ac762d4e1b258badfdab59d7d8b08e5 Mon Sep 17 00:00:00 2001 From: qizhicheng Date: Fri, 20 Oct 2023 00:12:39 +0800 Subject: [PATCH] support setting notifier with env --- archery/settings.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/archery/settings.py b/archery/settings.py index 527764a61c..4b144af8e3 100644 --- a/archery/settings.py +++ b/archery/settings.py @@ -54,6 +54,18 @@ "cassandra", ], ), + ENABLED_NOTIFIERS=( + list, + [ + "sql.notify:DingdingWebhookNotifier", + "sql.notify:DingdingPersonNotifier", + "sql.notify:FeishuWebhookNotifier", + "sql.notify:FeishuPersonNotifier", + "sql.notify:QywxWebhookNotifier", + "sql.notify:MailNotifier", + "sql.notify:GenericWebhookNotifier", + ] + ) ) # SECURITY WARNING: keep the secret key used in production secret! @@ -87,15 +99,7 @@ "odps": {"path": "sql.engines.odps:ODPSEngine"}, } -ENABLED_NOTIFIERS = ( - "sql.notify:DingdingWebhookNotifier", - "sql.notify:DingdingPersonNotifier", - "sql.notify:FeishuWebhookNotifier", - "sql.notify:FeishuPersonNotifier", - "sql.notify:QywxWebhookNotifier", - "sql.notify:MailNotifier", - "sql.notify:GenericWebhookNotifier", -) +ENABLED_NOTIFIERS = env("ENABLED_NOTIFIERS") ENABLED_ENGINES = env("ENABLED_ENGINES")