Skip to content

Commit 0bcb9c4

Browse files
committed
use db_session in a non-asynchronic function
1 parent 45586fc commit 0bcb9c4

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

functions-python/operations_api/src/feeds_operations/impl/feeds_operations_impl.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def assert_no_existing_feed_url(producer_url: str, db_session: Session):
109109
)
110110

111111
@with_db_session
112-
async def get_feeds(
112+
def handle_get_feeds(
113113
self,
114114
search_query: Optional[str] = None,
115115
operation_status: Optional[str] = None,
@@ -163,6 +163,20 @@ async def get_feeds(
163163
status_code=500, detail=f"Internal server error: {str(e)}"
164164
)
165165

166+
async def get_feeds(
167+
self,
168+
search_query: Optional[str] = None,
169+
operation_status: Optional[str] = None,
170+
data_type: Optional[str] = None,
171+
offset: str = "0",
172+
limit: str = "50",
173+
db_session: Session = None,
174+
) -> GetFeeds200Response:
175+
"""Get a list of feeds with optional filtering and pagination."""
176+
return self.handle_get_feeds(
177+
search_query, operation_status, data_type, offset, limit
178+
)
179+
166180
@with_db_session
167181
async def get_gtfs_feed(
168182
self,

0 commit comments

Comments
 (0)