Skip to content

Commit b782126

Browse files
committed
Reduce the logs when transforming feeds
1 parent d0b882e commit b782126

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,18 @@ class OperationsApiImpl(BaseOperationsApi):
5454

5555
def process_feed(self, feed) -> GtfsFeedResponse | GtfsRtFeedResponse:
5656
"""Process a feed into the appropriate response type using fromOrm methods."""
57-
logging.info("Processing feed %s with type %s", feed.stable_id, feed.data_type)
57+
logging.debug("Processing feed %s with type %s", feed.stable_id, feed.data_type)
5858

5959
if feed.data_type == "gtfs":
6060
result = GtfsFeedImpl.from_orm(feed)
61-
logging.info("Successfully processed GTFS feed %s", feed.stable_id)
61+
logging.debug("Successfully processed GTFS feed %s", feed.stable_id)
6262
return result
6363
elif feed.data_type == "gtfs_rt":
6464
result = GtfsRtFeedImpl.from_orm(feed)
65-
logging.info("Successfully processed GTFS-RT feed %s", feed.stable_id)
65+
logging.debug("Successfully processed GTFS-RT feed %s", feed.stable_id)
6666
return result
6767

68+
logging.error("Unsupported feed type: %s", feed.data_type)
6869
raise ValueError(f"Unsupported feed type: {feed.data_type}")
6970

7071
@with_db_session

0 commit comments

Comments
 (0)