mirror of
https://github.com/idanoo/go-mastodon-stats
synced 2025-07-01 13:52:20 +00:00
Log
This commit is contained in:
parent
43514cc0b0
commit
adfcf44890
3 changed files with 36 additions and 10 deletions
|
@ -162,6 +162,13 @@ func getLastMetric(serviceName string) int {
|
|||
|
||||
func getLastWeekMetric(serviceName string) int {
|
||||
monday := getStartofDayMonday()
|
||||
log.Printf(
|
||||
"SELECT metric_value FROM %s WHERE metric_name = '%s' AND service = '%s' AND metric_time = '%s' LIMIT 1",
|
||||
POSTGRESQL_STATS_TABLE,
|
||||
METRICNAME_USERCOUNT,
|
||||
serviceName,
|
||||
monday,
|
||||
)
|
||||
val, err := runIntQuery(
|
||||
POSTGRESQL_STATS_DB,
|
||||
fmt.Sprintf(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue