This commit is contained in:
idanoo 2023-02-13 08:22:12 +13:00
parent 43514cc0b0
commit adfcf44890
Signed by: idanoo
GPG key ID: 387387CDBC02F132
3 changed files with 36 additions and 10 deletions

View file

@ -3,7 +3,6 @@ package gomastodonstats
import (
"log"
"sort"
"time"
)
func Run() {
@ -23,16 +22,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)
// }
}
}