Skip to content

Commit

Permalink
Fixes docs typo in slack notifier
Browse files Browse the repository at this point in the history
  • Loading branch information
skrawcz committed Jul 29, 2024
1 parent 31d3b62 commit 3b568aa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hamilton/plugins/h_slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class SlackNotifier(NodeExecutionHook):
"""This is a adapter that sends a message to a slack channel when a node is executed.
"""This is a adapter that sends a message to a slack channel when a node is executed & fails.
Note: you need to have slack_sdk installed for this to work.
If you don't have it installed, you can install it with `pip install slack_sdk`
Expand Down Expand Up @@ -69,5 +69,8 @@ def run_after_node_execution(
):
"""Sends a message to the slack channel after a node is executed."""
if error is not None:
message = f"Error in Executing Node: {node_name}. Task ID: {task_id}. Run ID: {run_id}. Error: {error}.\n Stack Trace: {''.join(traceback.format_tb(error.__traceback__))}"
message = (
f"Error in Executing Node: {node_name}. Task ID: {task_id}. Run ID: {run_id}. "
f"Error: {error}.\n Stack Trace: {''.join(traceback.format_tb(error.__traceback__))}"
)
self._send_message(message)

0 comments on commit 3b568aa

Please sign in to comment.