Skip to content

Commit

Permalink
parking-offstreet-sta: move logging to bdplib
Browse files Browse the repository at this point in the history
  • Loading branch information
dulvui committed Jan 11, 2024
1 parent 84c69f0 commit 595f9b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
3 changes: 2 additions & 1 deletion data-collectors/parking-offstreet-sta/src/bdplib/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"log/slog"
"net/http"
"os"
"strconv"
)

type Provenance struct {
Expand Down Expand Up @@ -84,7 +85,7 @@ func SyncDataTypes(stationType string, dataTypes []DataType) {
func SyncStations(stationType string, stations []Station) {
pushProvenance()

slog.Info("Syncing stations...")
slog.Info("Syncing " + strconv.Itoa(len(stations)) + " " + stationType + " stations...")

url := baseUri + syncStationsPath + "/" + stationType + "?prn=" + prn + "&prv=" + prv

Expand Down
9 changes: 0 additions & 9 deletions data-collectors/parking-offstreet-sta/src/dc/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
package dc

import (
"log/slog"
"os"
"parking-offstreet-sta/bdplib"
"strconv"
Expand Down Expand Up @@ -77,19 +76,11 @@ func Job() {
}
}

// sync parent stations
slog.Info("Sync parent stations amount: " + strconv.Itoa(len(parentStations)))
bdplib.SyncStations(stationTypeParent, parentStations)
slog.Info("Sync parent stations done.")
// sync stations
slog.Info("Sync stations amount: " + strconv.Itoa(len(stations)))
bdplib.SyncStations(stationType, stations)
slog.Info("Sync stations done.")

// push station data
slog.Info("Sync records...")
bdplib.PushData(stationType, dataMap)
slog.Info("Sync records done.")
}

func SyncDataTypes() {
Expand Down

0 comments on commit 595f9b9

Please sign in to comment.