Skip to content

Commit

Permalink
Merge pull request #241 from cityofaustin/ch-dms-date
Browse files Browse the repository at this point in the history
DMS message pub: remove date_filter_arg
  • Loading branch information
Charlie-Henry authored Aug 2, 2024
2 parents d03bc19 + 78a9d35 commit 5aa8fd5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dags/atd_knack_dms.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# test locally with: docker compose run --rm airflow-cli dags test atd_knack_dms

import os

from airflow.models import DAG
from airflow.operators.docker_operator import DockerOperator
from pendulum import datetime, duration

from utils.onepassword import get_env_vars_task
from utils.knack import get_date_filter_arg
from utils.slack_operator import task_fail_slack_alert

DEPLOYMENT_ENVIRONMENT = os.getenv("ENVIRONMENT", "development")
Expand Down Expand Up @@ -73,16 +74,14 @@
app_name = "data-tracker"
container = "view_1564"

date_filter_arg = get_date_filter_arg(should_replace_monthly=True)

env_vars = get_env_vars_task(REQUIRED_SECRETS)

t1 = DockerOperator(
task_id="atd_knack_dms_to_postgrest",
docker_conn_id="docker_default",
image=docker_image,
auto_remove=True,
command=f"./atd-knack-services/services/records_to_postgrest.py -a {app_name} -c {container} {date_filter_arg}",
command=f"./atd-knack-services/services/records_to_postgrest.py -a {app_name} -c {container}",
environment=env_vars,
tty=True,
force_pull=True,
Expand All @@ -94,7 +93,7 @@
image=docker_image,
docker_conn_id="docker_default",
auto_remove=True,
command=f"./atd-knack-services/services/records_to_socrata.py -a {app_name} -c {container} {date_filter_arg}",
command=f"./atd-knack-services/services/records_to_socrata.py -a {app_name} -c {container}",
environment=env_vars,
tty=True,
mount_tmp_dir=False,
Expand All @@ -105,10 +104,10 @@
image=docker_image,
docker_conn_id="docker_default",
auto_remove=True,
command=f"./atd-knack-services/services/records_to_agol.py -a {app_name} -c {container} {date_filter_arg}",
command=f"./atd-knack-services/services/records_to_agol.py -a {app_name} -c {container}",
environment=env_vars,
tty=True,
mount_tmp_dir=False,
)

date_filter_arg >> t1 >> t2 >> t3
t1 >> t2 >> t3

0 comments on commit 5aa8fd5

Please sign in to comment.