File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
functions-python/operations_api/src/feeds_operations/impl Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1515#
1616
1717import logging
18+ import os
1819from typing import Annotated
1920
2021from deepdiff import DeepDiff
3233from feeds_operations_gen .models .update_request_gtfs_rt_feed import (
3334 UpdateRequestGtfsRtFeed ,
3435)
35- from helpers .database import with_db_session , refresh_materialized_view
36+ from helpers .database import Database , with_db_session , refresh_materialized_view
3637from helpers .query_helper import query_feed_by_stable_id
3738from .models .update_request_gtfs_rt_feed_impl import UpdateRequestGtfsRtFeedImpl
3839from .request_validator import validate_request
@@ -116,8 +117,9 @@ async def _update_feed(
116117 """
117118 Update the specified feed in the Mobility Database
118119 """
120+ db = Database (database_url = os .getenv ("FEEDS_DATABASE_URL" ))
119121 try :
120- with with_db_session () as db_session :
122+ with db . start_db_session () as db_session :
121123 feed = await OperationsApiImpl .fetch_feed (
122124 data_type , db_session , update_request_feed
123125 )
You can’t perform that action at this time.
0 commit comments