Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Fix inconsistent alignment in slack message text (#328)
Madison Swain-Bowdenb07282dc00ab
diff --git a/openverse_catalog/dags/common/slack.py b/openverse_catalog/dags/common/slack.pyindex 37c10cb61..c27fcc0e6 100644--- a/openverse_catalog/dags/common/slack.py+++ b/openverse_catalog/dags/common/slack.py@@ -43,7 +43,6 @@ More information can be found here: https://app.slack.com/block-kit-builder.import jsonimport logging-import textwrapfrom os.path import basenamefrom typing import Any, Callable, Optional@@ -256,13 +255,11 @@ def on_failure_callback(context: dict) -> None:*Exception Type*: `{exception.__class__.__module__}.{exception.__class__.__name__}`"""- message = textwrap.dedent(- f"""- *DAG*: `{ti.dag_id}`- *Task*: `{ti.task_id}`- *Execution Date*: {execution_date.strftime('%Y-%m-%dT%H:%M:%SZ')}- *Log*: {ti.log_url}- {exception_message}- """- )+ message = f"""+*DAG*: `{ti.dag_id}`+*Task*: `{ti.task_id}`+*Execution Date*: {execution_date.strftime('%Y-%m-%dT%H:%M:%SZ')}+*Log*: {ti.log_url}+{exception_message}+"""send_message(message, username="Airflow DAG Failure")