Skip to content

Commit

Permalink
Fix path error
Browse files Browse the repository at this point in the history
  • Loading branch information
chmnata authored and tahaislam committed Sep 29, 2023
1 parent f198148 commit 7541ef6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dags/pull_here.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,12 @@
from airflow.providers.postgres.hooks.postgres import PostgresHook
from airflow.models import Variable

repo_path = os.path.abspath(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
sys.path.insert(0, repo_path)
from dags.dag_functions import task_fail_slack_alert
try:
repo_path = os.path.abspath(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
sys.path.insert(0, repo_path)
from dags.dag_functions import task_fail_slack_alert
except:
raise ImportError("Cannot import slack alert functions")

dag_name = 'pull_here'

Expand Down

0 comments on commit 7541ef6

Please sign in to comment.