Skip to content
Snippets Groups Projects
Commit 53019718 authored by Alexander Pace's avatar Alexander Pace
Browse files

optionally turn off igwn-alerts to *_{search} topics

parent 8ea3689f
No related branches found
No related tags found
1 merge request!197optionally turn off igwn-alerts to *_{search} topics
Pipeline #598587 passed
......@@ -150,6 +150,13 @@ SEND_MATTERMOST_ALERTS = False
# IGWN_ALERT_GROUP environment variable.
DEFAULT_IGWN_ALERT_GROUP = 'lvalert-dev'
# enable/disable sending alerts to topics that have the search tag
# for g/e-events. default to false, so only send to {group}_{pipeline}
SEND_TO_SEARCH_TOPICS = parse_envvar_bool(
get_from_env('IGWN_ALERT_SEARCH_TOPICS',
fail_if_not_found=False, default_value="false")
)
# overseer timeout:
OVERSEER_TIMEOUT = float(get_from_env('IGWN_ALERT_OVERSEER_TIMEOUT',
fail_if_not_found=False, default_value=0.1))
......
......@@ -48,7 +48,7 @@ def get_xmpp_node_names(event_or_superevent):
gp_node = "{group}_{pipeline}".format(group=event.group.name,
pipeline=event.pipeline.name).lower()
node_names.append(gp_node)
if event.search:
if event.search and settings.SEND_TO_SEARCH_TOPICS:
gps_node = gp_node + "_{search}".format(
search=event.search.name.lower())
node_names.append(gps_node)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment