Skip to content

Commit

Permalink
remove legacy version of hacker news schedule (#6797)
Browse files Browse the repository at this point in the history
  • Loading branch information
sryza committed Mar 7, 2022
1 parent cddc63c commit 5bfadb9
Showing 1 changed file with 1 addition and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime

from dagster import hourly_partitioned_config, hourly_schedule
from dagster import hourly_partitioned_config


@hourly_partitioned_config(start_date=datetime(2021, 1, 1))
Expand All @@ -11,28 +11,3 @@ def hourly_download_schedule_config(start: datetime, end: datetime):
"partition_end": {"config": end.strftime("%Y-%m-%d %H:%M:%S")},
}
}


# legacy


def get_hourly_download_def_schedule_config(start_time: datetime):
return {
"resources": {
"partition_start": {"config": start_time.strftime("%Y-%m-%d %H:00:00")},
"partition_end": {"config": start_time.strftime("%Y-%m-%d %H:59:59")},
}
}


@hourly_schedule(
pipeline_name="download_pipeline",
start_date=datetime(2021, 1, 1),
execution_timezone="UTC",
mode="prod",
)
def hourly_hn_download_schedule(date):
"""
This schedule runs the download pipeline once every hour.
"""
return get_hourly_download_def_schedule_config(date)

0 comments on commit 5bfadb9

Please sign in to comment.