Skip to content

Commit

Permalink
Update backfill
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte committed Aug 1, 2024
1 parent 9bc2250 commit 34f9d27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ingestor/chalicelib/agg_speed_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ class TripsByLineParams:
agg: Range


def populate_table(line: Line, range: Range):
def populate_table(line: Line, range: Range, start_date: str = "2016-01-01"):
"""Populate weekly or monthly aggregate speed table for a given line. Ran manually as a lambda in AWS console"""
print(f"Populating {range} table")
table = constants.TABLE_MAP[range]
today = datetime.now().strftime(constants.DATE_FORMAT_BACKEND)
trips = actual_trips_by_line(
{
"start_date": "2016-01-01",
"start_date": start_date,
"end_date": today,
"line": line,
"agg": range,
Expand Down
4 changes: 2 additions & 2 deletions ingestor/chalicelib/trip_metrics/backfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

from .ingest import ingest_trip_metrics, get_date_ranges

START_DATE = date(2024, 3, 1)
END_DATE = date(2024, 5, 14)
START_DATE = date(2024, 5, 1)
END_DATE = date(2024, 7, 31)
MAX_RANGE_SIZE = 90

if __name__ == "__main__":
Expand Down

0 comments on commit 34f9d27

Please sign in to comment.