diff --git a/internal/gomastodonstats/main.go b/internal/gomastodonstats/main.go index df4520d..515ec82 100644 --- a/internal/gomastodonstats/main.go +++ b/internal/gomastodonstats/main.go @@ -3,6 +3,7 @@ package gomastodonstats import ( "log" "sort" + "time" ) func Run() { @@ -22,16 +23,16 @@ func Run() { return updatedMetrics[i].MetricValue > updatedMetrics[j].MetricValue }) - // sendToMatrix(updatedMetrics) + sendToMatrix(updatedMetrics) // Only post weekly here - // localTime, err := time.LoadLocation(TIMEZONE) - // if err != nil { - // log.Fatal(err) - // } - // weekday := time.Now().Local().In(localTime).Weekday() - // if weekday == time.Monday { - // postToMastodon(updatedMetrics) - // } + localTime, err := time.LoadLocation(TIMEZONE) + if err != nil { + log.Fatal(err) + } + weekday := time.Now().Local().In(localTime).Weekday() + if weekday == time.Monday { + postToMastodon(updatedMetrics) + } } } diff --git a/internal/gomastodonstats/metrics.go b/internal/gomastodonstats/metrics.go index ddcfc64..a228049 100644 --- a/internal/gomastodonstats/metrics.go +++ b/internal/gomastodonstats/metrics.go @@ -173,8 +173,6 @@ func getLastWeekMetric(serviceName string) int { monday, ) - log.Println(val) - if err != nil { log.Println(err) return 0