diff --git a/database/EstimatedCall.go b/database/EstimatedCall.go index 691ab11..0321ca7 100644 --- a/database/EstimatedCall.go +++ b/database/EstimatedCall.go @@ -83,7 +83,7 @@ func InsertOrUpdateEstimatedCall(ctx context.Context, db *sql.DB, values []inter } return id, action, nil } else { - fmt.Printf("MATCH!!! Original Hash: %s, Retrieved Hash: %s\n", hashString, retrievedHash) - return 0, "no update", nil + //fmt.Printf("MATCH!!! Original Hash: %s, Retrieved Hash: %s\n", hashString, retrievedHash) + return 0, "none", nil } } diff --git a/export/database.go b/export/database.go index c6fd439..3841499 100644 --- a/export/database.go +++ b/export/database.go @@ -38,7 +38,7 @@ func DBData(data *data.Data) { fmt.Println("SID:", sid) // counters - var insertCount, updateCount, totalCount, estimatedCallInsertCount, estimatedCallUpdateCount, recordedCallInsertCount, recordedCallUpdateCount int + var insertCount, updateCount, totalCount, estimatedCallInsertCount, estimatedCallUpdateCount, estimatedCallNoneCount, recordedCallInsertCount, recordedCallUpdateCount int for _, journey := range data.ServiceDelivery.EstimatedTimetableDelivery[0].EstimatedJourneyVersionFrame.EstimatedVehicleJourney { var values []interface{} @@ -169,12 +169,13 @@ func DBData(data *data.Data) { //fmt.Printf("Inserts: %d, Updates: %d, Total: %d\n", insertCount, updateCount, totalCount) if totalCount%1000 == 0 { fmt.Printf( - "Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d; recordedCalls = I: %d U: %d\n", + "Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d N: %d; recordedCalls = I: %d U: %d\n", insertCount, updateCount, totalCount, estimatedCallInsertCount, estimatedCallUpdateCount, + estimatedCallNoneCount, recordedCallInsertCount, recordedCallUpdateCount, ) @@ -313,6 +314,8 @@ func DBData(data *data.Data) { estimatedCallInsertCount++ } else if action == "update" { estimatedCallUpdateCount++ + } else if action == "none" { + estimatedCallNoneCount++ } } } @@ -397,12 +400,13 @@ func DBData(data *data.Data) { } fmt.Printf( - "DONE: Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d; recordedCalls = I: %d U: %d\n", + "DONE: Inserts: %d, Updates: %d, Total: %d; estimatedCalls = I: %d U: %d N: %d; recordedCalls = I: %d U: %d\n", insertCount, updateCount, totalCount, estimatedCallInsertCount, estimatedCallUpdateCount, + estimatedCallNoneCount, recordedCallInsertCount, recordedCallUpdateCount, ) diff --git a/main.go b/main.go index f215944..2000e0b 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( ) func main() { - log.Println("ti1 v0.1.2 - 09.01...") + log.Println("ti1 v0.1.2 - 09.01.2025..") log.Println("Starting...") // Setup the database