File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ package app
22
33import (
44 "flag"
5- "fmt"
65 "log"
76 "os"
87 "time"
@@ -78,22 +77,26 @@ func Main() {
7877 startDate = endDate .Add (time .Duration (- config .ExtractDays ) * 48 * time .Hour ).Add (time .Minute )
7978 }
8079
80+ log .Println ("Downloading CSV..." )
8181 path , err := DownloadCsv (config , startDate .Format ("01/02/2006" ), endDate .Format ("01/02/2006" ))
8282 if err != nil {
8383 log .Fatal (err )
8484 }
85- fmt .Printf ("file downloaded: %s" , path )
85+ log .Printf ("CSV downloaded: %s\n " , path )
8686
8787 records , err := ParseCsv (path )
8888 if err != nil {
8989 log .Fatal (err )
9090 }
91+ log .Println ("Querying previous metrics..." )
9192 existingPoints , err := QueryPreviousMetrics (startDate , endDate , config .InfluxDB )
9293 if err != nil {
9394 log .Fatal (err )
9495 }
96+ log .Println ("Inserting data..." )
9597 err = WriteMetrics (records , config .InfluxDB , existingPoints )
9698 if err != nil {
9799 log .Fatal (err )
98100 }
101+ log .Println ("Done" )
99102}
You can’t perform that action at this time.
0 commit comments