Add additional logging to identify why CIF updates were sometimes failing

This commit is contained in:
Fred Boniface
2024-04-13 21:45:24 +01:00
parent 16fa1c5354
commit 77dc11a658
2 changed files with 12 additions and 0 deletions

View File

@@ -68,6 +68,11 @@ func processParsedCif(data *parsedData) error {
// Create delete query types and pass to the function which batches the deletions
func doDeletions(deletions []*upstreamApi.JsonScheduleV1) error {
defer func() {
if r := recover(); r != nil {
log.Msg.Panic("Panic:", zap.Any("panic", r))
}
}()
deleteQueries := make([]database.DeleteQuery, 0)
for _, item := range deletions {
query := database.DeleteQuery{