@
dagster.
success_hook
(name=None, required_resource_keys=None)[source]¶Create a hook on step success events with the specified parameters from the decorated function.
Examples
@success_hook(required_resource_keys={'slack'})
def slack_message_on_success(context):
message = 'solid {} succeeded'.format(context.solid.name)
context.resources.slack.send_message(message)
@success_hook
def do_something_on_success(context):
do_something()
@
dagster.
failure_hook
(name=None, required_resource_keys=None)[source]¶Create a hook on step failure events with the specified parameters from the decorated function.
Examples
@failure_hook(required_resource_keys={'slack'})
def slack_message_on_failure(context):
message = 'solid {} failed'.format(context.solid.name)
context.resources.slack.send_message(message)
@failure_hook
def do_something_on_failure(context):
do_something()