Skip to content

Commit

Permalink
Increase frequency of alerts processing
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte committed Sep 30, 2024
1 parent 9d7e158 commit b652bf5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ingestor/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ def update_trip_metrics(event):
trip_metrics.ingest_recent_trip_metrics(lookback_days=7)


# 10:45am UTC -> 5:45/6:45am ET every Monday
# There's no benefit to running it more frequently than once a week.
@app.schedule(Cron(45, 10, "?", "*", "MON", "*"))
# 8:30am UTC -> 3:30/4:30am ET every Monday and Wednesday
# There's shouldn't be any benefit to running it more frequently.
@app.schedule(Cron(30, 8, "?", "*", "MON,WED", "*"))
def update_alert_delays(event):
today = datetime.now()
one_week_ago = (today - timedelta(days=8)).date()
one_week_ago = (today - timedelta(days=15)).date()
delays.update_table(one_week_ago, today.date())


Expand Down

0 comments on commit b652bf5

Please sign in to comment.