Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ gtfs/*.zip
gtfs/*.pbf
gtfs/*.json

# data/agencyconf is explictly not ignored, as needed for tests
data/agencyconf/
!data/agencyconf/mfdz.json
data/carpool/
data/enhanced/
data/failed/
Expand Down
7 changes: 5 additions & 2 deletions amarillo/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ def configure_enhancer_services():
# notify carpool about carpools in trash, as delete notifications must be sent
for carpool_file_name in glob(f'data/trash/{agency_id}/*.json'):
with open(carpool_file_name) as carpool_file:
carpool = Carpool(**(json.load(carpool_file)))
container['carpools'].delete(carpool.agency, carpool.id)
try:
carpool = Carpool(**(json.load(carpool_file)))
container['carpools'].delete(carpool.agency, carpool.id)
except Exception as e:
logger.warning("Issue during deletion of carpool %s: %s", carpool_file_name, repr(e))

logger.info("Restored carpools: %s", container['carpools'].get_all_ids())
logger.info("Starting scheduler")
Expand Down
3 changes: 2 additions & 1 deletion amarillo/services/gtfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,5 @@ def _as_added_updates(self, trip, fromdate):
'stopTimeUpdate': self._to_stop_times(trip, trip_date)
} for trip_date in trip.next_trip_dates(fromdate)]
except AttributeError:
logger.error(f"Error adding updates for trip {trip.trip_id}")
logger.exception(f"Error adding updates for trip {trip.trip_id}")
return []