diff --git a/pipelines/utils/utils.py b/pipelines/utils/utils.py index 408fa234f..0e867a469 100644 --- a/pipelines/utils/utils.py +++ b/pipelines/utils/utils.py @@ -195,8 +195,13 @@ def notify_discord_on_failure( """ url = get_vault_secret(secret_path)["data"]["url"] flow_run_id = prefect.context.get("flow_run_id") + flow_project = prefect.context.get("project", {}).get("name") code_owners = code_owners or constants.DEFAULT_CODE_OWNERS.value code_owner_dict = constants.OWNERS_DISCORD_MENTIONS.value + + if flow_project != "main": + return + at_code_owners = [] for code_owner in code_owners: code_owner_id = code_owner_dict[code_owner]["user_id"]