Skip to content

Commit

Permalink
address comment
Browse files Browse the repository at this point in the history
  • Loading branch information
bskim45 committed Nov 26, 2022
1 parent c9f977f commit 4e26016
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metadata-ingestion/src/datahub_provider/_plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from datahub_provider._airflow_compat import Operator

import contextlib
import logging
import traceback
from typing import Any, Iterable, List

Expand All @@ -16,6 +17,7 @@
from datahub_provider.hooks.datahub import DatahubGenericHook
from datahub_provider.lineage.datahub import DatahubLineageConfig

logger = logging.getLogger(__name__)

def get_lineage_config() -> DatahubLineageConfig:
"""Load the lineage config from airflow.cfg."""
Expand Down Expand Up @@ -275,6 +277,7 @@ def custom_on_success_callback(context):


def task_policy(task: BaseOperator) -> None:
task.log.debug(f"Setting task policy for Dag: {task.dag_id} Task: {task.task_id}")
# task.add_inlets(["auto"])
# task.pre_execute = _wrap_pre_execution(task.pre_execute)
task.on_failure_callback = _wrap_on_failure_callback(task.on_failure_callback)
Expand All @@ -301,6 +304,8 @@ def _patch_policy(settings):


def _patch_datahub_policy():
logger.info("Patching datahub policy")

with contextlib.suppress(ImportError):
import airflow_local_settings

Expand Down

0 comments on commit 4e26016

Please sign in to comment.