Skip to content

Commit 5e281ee

Browse files
committed
fix(airflow): variable import from script to dag
1 parent e9a58c8 commit 5e281ee

3 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/airflow/dags/dag-inference.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from airflow.providers.docker.operators.docker import DockerOperator
33
from datetime import datetime, timedelta
44

5+
from airflow.models import Variable
6+
57
default_args = {
68
'owner': 'airflow',
79
'retries': 1,

src/airflow/src/airflow_inference.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
import logging
33
import os
44

5-
from airflow.models import Variable
6-
75
BASE_URL = os.getenv('INFERENCE_URL')
86
NEO4J_DB = os.getenv('NEO4J_DATABASE')
97
API_TOKEN = os.getenv('API_TOKEN')

tools/images/Dockerfile-airflow

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@ FROM python:3.9-slim
22

33
WORKDIR /app
44

5-
RUN pip install --no-cache-dir "apache-airflow==2.9.1" \
6-
--constraint "https://raw.githubusercontent.com/apache/airflow/constraints-2.9.1/constraints-3.9.txt" \
7-
requests
5+
RUN pip install --no-cache-dir requests
86

97
COPY ../../src/airflow/src/airflow_inference.py .
108

0 commit comments

Comments
 (0)