Skip to content

Commit

Permalink
support setting notifier with env
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote committed Oct 19, 2023
1 parent 405dc9e commit 5122cee
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions archery/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 5122cee

Please sign in to comment.