mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-02 22:32:19 +00:00
Re-enable posting
This commit is contained in:
parent
c2b054158d
commit
f86c26b84f
2 changed files with 10 additions and 11 deletions
|
@ -3,6 +3,7 @@ package gomastodonstats
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"sort"
|
"sort"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Run() {
|
func Run() {
|
||||||
|
@ -22,16 +23,16 @@ func Run() {
|
||||||
return updatedMetrics[i].MetricValue > updatedMetrics[j].MetricValue
|
return updatedMetrics[i].MetricValue > updatedMetrics[j].MetricValue
|
||||||
})
|
})
|
||||||
|
|
||||||
// sendToMatrix(updatedMetrics)
|
sendToMatrix(updatedMetrics)
|
||||||
|
|
||||||
// Only post weekly here
|
// Only post weekly here
|
||||||
// localTime, err := time.LoadLocation(TIMEZONE)
|
localTime, err := time.LoadLocation(TIMEZONE)
|
||||||
// if err != nil {
|
if err != nil {
|
||||||
// log.Fatal(err)
|
log.Fatal(err)
|
||||||
// }
|
}
|
||||||
// weekday := time.Now().Local().In(localTime).Weekday()
|
weekday := time.Now().Local().In(localTime).Weekday()
|
||||||
// if weekday == time.Monday {
|
if weekday == time.Monday {
|
||||||
// postToMastodon(updatedMetrics)
|
postToMastodon(updatedMetrics)
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -173,8 +173,6 @@ func getLastWeekMetric(serviceName string) int {
|
||||||
monday,
|
monday,
|
||||||
)
|
)
|
||||||
|
|
||||||
log.Println(val)
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue