Skip to content

Commit

Permalink
fix gtfs agg queries optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Dec 4, 2023
1 parent 47ede7e commit 0dbf39a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions open_bus_stride_api/routers/gtfs_rides_agg.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ def list_(limit: int = common.param_limit(default_limit=DEFAULT_LIMIT),
sql_params = {
'date_from': date_from,
'date_to': date_to,
'rt_date_from': date_from - datetime.timedelta(days=1),
'rt_date_to': date_from + datetime.timedelta(days=1),
'rt_date_from': date_from - datetime.timedelta(days=30),
'rt_date_to': date_from + datetime.timedelta(days=30),
}

if exclude_hours_from:
Expand Down Expand Up @@ -126,8 +126,8 @@ def group_by_(date_from: datetime.date = common.doc_param('date', filter_type='d
sql_params = {
'date_from': date_from,
'date_to': date_to,
'rt_date_from': date_from - datetime.timedelta(days=1),
'rt_date_to': date_from + datetime.timedelta(days=1),
'rt_date_from': date_from - datetime.timedelta(days=30),
'rt_date_to': date_from + datetime.timedelta(days=30),
}

if exclude_hours_from:
Expand Down

0 comments on commit 0dbf39a

Please sign in to comment.