Johannes Müller
08/22/2023, 9:25 AM@failure_hook(required_resource_keys={"slack"})
def slack_message_on_failure(context: HookContext):
message = (
f"Application database sync to our data warehouse failed: Operation {context.op.name} failed.\ņ"
f"Please fix and rerun the associated operation."
)
context.resources.slack.chat_postMessage(channel="#test42", text=message)
Antoine Adam
08/22/2023, 10:07 AM\ņ
and not \n
in your code (notice the “’” under the “n”).Johannes Müller
08/22/2023, 10:54 AMJohannes Müller
08/22/2023, 10:54 AM