Skip to content

Commit 8816e89

Browse files
Merge pull request #351 from cityofaustin/open311-parsing-order
Open311 fixing task order and parsing bug
2 parents 617505d + bb598ba commit 8816e89

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

dags/dts_open_311_scrape.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,14 @@
8989
docker_image = "atddocker/dts-311-reporting:production"
9090

9191
env_vars = get_env_vars_task(REQUIRED_SECRETS)
92-
one_day_ago = now("America/Chicago").subtract(days=1)
92+
93+
@task
94+
def one_day_prev():
95+
return now("America/Chicago").subtract(days=1).to_iso8601_string()
96+
97+
one_day_ago = one_day_prev()
9398
prev_run_time = get_previous_success_start_time(
94-
fallback_date=one_day_ago.to_iso8601_string()
99+
fallback_date=one_day_ago
95100
)
96101

97102
t1 = DockerOperator(
@@ -106,4 +111,4 @@
106111
force_pull=True,
107112
)
108113

109-
t1
114+
env_vars >> one_day_ago >> prev_run_time >> t1

0 commit comments

Comments
 (0)