imma call it a night

This commit is contained in:
Peder Vatn Austad
2024-12-26 19:38:28 +01:00
parent db7485d140
commit 5fd16ff73c
5 changed files with 14 additions and 10 deletions

View File

@@ -12,6 +12,7 @@ The best thing to happen since yesturday at 3 pm
| Version | Changes |
|-----------|----------------------|
| 0.3 | it works as i want it to now (i think) now its time for a shiton of trubleshooting (yay!) |
| 0.2 | split the project into multiple files to make it more readable |
| 0.1.1-7 | fixing the json print output to actualy print out all the data and sutch |
| 0.1 | literaly most of the project |

View File

@@ -48,10 +48,9 @@ func PrintDBConfig() {
return
}
fmt.Println("Configuration:", config)
fmt.Println("Host:", config.Database.Host)
fmt.Println("Port:", config.Database.Port)
fmt.Println("User:", config.Database.User)
fmt.Println("Database Host:", config.Database.Host)
fmt.Println("Database Password:", config.Database.Password)
//fmt.Println("Configuration:", config)
//fmt.Println("Host:", config.Database.Host)
//fmt.Println("Port:", config.Database.Port)
fmt.Println("Database User:", config.Database.User)
//fmt.Println("Database Password:", config.Database.Password)
}

View File

@@ -169,7 +169,7 @@ func FetchData() (*Data, error) {
},
}
resp, err := client.Get("https://api.entur.io/realtime/v1/rest/et?useOriginalId=true&maxSize=10")
resp, err := client.Get("https://api.entur.io/realtime/v1/rest/et?useOriginalId=true&maxSize=100000&requestorId=ti1ASDASDDAAWdfs")
if err != nil {
return nil, err
}

View File

@@ -42,7 +42,7 @@ func InsertOrUpdateEstimatedCall(db *sql.DB, values []interface{}) (int, string,
var id int
err = stmt.QueryRow(values...).Scan(&action, &id)
if err != nil {
if 1 == 0 {
if 1 == 1 {
fmt.Println("Executing query:", query)
for i, v := range values {
fmt.Printf("Value %d: (%v)\n", i+1, v)

View File

@@ -140,7 +140,9 @@ func DBData(data *data.Data) {
if err != nil {
fmt.Printf("Error inserting/updating estimated vehicle journey: %v\n", err)
} else {
fmt.Printf("Action: %s, ID: %d\n", action, id)
if 1 == 0 {
fmt.Printf("Action: %s, ID: %d\n", action, id)
}
}
for _, estimatedCall := range journey.EstimatedCalls {
for _, call := range estimatedCall.EstimatedCall {
@@ -266,7 +268,9 @@ func DBData(data *data.Data) {
if err != nil {
fmt.Printf("Error inserting/updating estimated call: %v\n", err)
} else {
fmt.Printf("Action: %s, ID: %d\n", action, id)
if 1 == 0 {
fmt.Printf("Action: %s, ID: %d\n", action, id)
}
}
}
}