From fbb20d576b9be3f4db6164b574c85dd34c18c39c Mon Sep 17 00:00:00 2001 From: pigwin Date: Tue, 23 Dec 2025 17:14:43 +0000 Subject: [PATCH 1/3] v1.0.1 --- .github/workflows/docker-image.yml | 23 ++++++++--------------- main.go | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 92a423b..8a2cd12 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -5,7 +5,6 @@ on: branches: - main - dev - - v1.0 jobs: build: @@ -48,18 +47,12 @@ jobs: - name: Push Docker image run: | - # If on v1.0 branch, push to 'testingv1.0' tag - if [[ "${{ github.ref }}" == "refs/heads/v1.0" ]]; then - docker tag ti1:${{ env.VERSION }} ${{ secrets.DOCKER_USERNAME }}/ti1:testingv1.0 - docker push ${{ secrets.DOCKER_USERNAME }}/ti1:testingv1.0 - else - # Always push to 'dev' tag for main and dev branches - docker tag ti1:${{ env.VERSION }} ${{ secrets.DOCKER_USERNAME }}/ti1:dev - docker push ${{ secrets.DOCKER_USERNAME }}/ti1:dev + # Always push to 'dev' tag + docker tag ti1:${{ env.VERSION }} ${{ secrets.DOCKER_USERNAME }}/ti1:dev + docker push ${{ secrets.DOCKER_USERNAME }}/ti1:dev - # If the version is valid, also push that specific version tag - if [[ "${{ env.VERSION }}" != "dev" ]]; then - docker tag ti1:${{ env.VERSION }} ${{ secrets.DOCKER_USERNAME }}/ti1:${{ env.VERSION }} - docker push ${{ secrets.DOCKER_USERNAME }}/ti1:${{ env.VERSION }} - fi - fi + # If the version is valid, also push that specific version tag + if [[ "${{ env.VERSION }}" != "dev" ]]; then + docker tag ti1:${{ env.VERSION }} ${{ secrets.DOCKER_USERNAME }}/ti1:${{ env.VERSION }} + docker push ${{ secrets.DOCKER_USERNAME }}/ti1:${{ env.VERSION }} + fi \ No newline at end of file diff --git a/main.go b/main.go index cdd201a..cf20c8f 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( ) func main() { - log.Println("ti1 testing v1.0.0") + log.Println("ti1 testing v1.0.1") log.Println("Starting...") // Setup the database From 4bb49e944f78701288005adeec5accf73c755262 Mon Sep 17 00:00:00 2001 From: pigwin Date: Tue, 23 Dec 2025 20:41:45 +0000 Subject: [PATCH 2/3] start end cool --- export/database.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/export/database.go b/export/database.go index c5871af..db5eaa2 100644 --- a/export/database.go +++ b/export/database.go @@ -11,6 +11,7 @@ import ( "ti1/config" "ti1/data" "ti1/database" + "time" ) // DBData is the main entry point for data processing @@ -45,6 +46,9 @@ func DBDataOptimized(data *data.Data) { } fmt.Println("SID:", sid) + // Record start time + startTime := time.Now() + // Atomic counters for thread-safe counting var insertCount, updateCount, estimatedCallInsertCount, estimatedCallUpdateCount, estimatedCallNoneCount, recordedCallInsertCount, recordedCallUpdateCount, recordedCallNoneCount int64 @@ -444,6 +448,9 @@ func DBDataOptimized(data *data.Data) { close(recordedCallJobs) callWg.Wait() + // Record end time + endTime := time.Now() + // Print final stats fmt.Printf( "\nDONE: EVJ - Inserts: %d, Updates: %d, Total: %d\n"+ @@ -470,6 +477,9 @@ func DBDataOptimized(data *data.Data) { serviceDeliveryJsonObject["RecordedCallInserts"] = atomic.LoadInt64(&recordedCallInsertCount) serviceDeliveryJsonObject["RecordedCallUpdates"] = atomic.LoadInt64(&recordedCallUpdateCount) serviceDeliveryJsonObject["RecordedCallNone"] = atomic.LoadInt64(&recordedCallNoneCount) + serviceDeliveryJsonObject["StartTime"] = startTime.Format(time.RFC3339) + serviceDeliveryJsonObject["EndTime"] = endTime.Format(time.RFC3339) + serviceDeliveryJsonObject["Duration"] = endTime.Sub(startTime).String() // Convert JSON object to JSON string serviceDeliveryJsonString, err := json.Marshal(serviceDeliveryJsonObject) From bcdc24e47f660e07b9b5ddcc8dbbd3734af21327 Mon Sep 17 00:00:00 2001 From: pigwin Date: Tue, 23 Dec 2025 20:42:13 +0000 Subject: [PATCH 3/3] oppdatere print log --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index cf20c8f..c8b9158 100644 --- a/main.go +++ b/main.go @@ -9,7 +9,7 @@ import ( ) func main() { - log.Println("ti1 testing v1.0.1") + log.Println("ti1 testing v1.0.2") log.Println("Starting...") // Setup the database