|
|
@ -136,11 +136,17 @@ if config.statistics_enabled
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"openRegistrations" => config.registration_enabled,
|
|
|
|
"openRegistrations" => config.registration_enabled,
|
|
|
|
"usage" => {
|
|
|
|
"usage" => {
|
|
|
|
"total" => PG_DB.query_one("SELECT count(*) FROM users", as: Int64),
|
|
|
|
{
|
|
|
|
"activeHalfyear" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '6 months'", as: Int64),
|
|
|
|
"users" => {
|
|
|
|
"activeMonth" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '1 month'", as: Int64),
|
|
|
|
"total" => PG_DB.query_one("SELECT count(*) FROM users", as: Int64),
|
|
|
|
|
|
|
|
"activeHalfyear" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '6 months'", as: Int64),
|
|
|
|
|
|
|
|
"activeMonth" => PG_DB.query_one("SELECT count(*) FROM users WHERE CURRENT_TIMESTAMP - updated < '1 month'", as: Int64),
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
"metadata" => {
|
|
|
|
|
|
|
|
"updatedAt" => Time.now.to_unix,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
"updatedAt" => Time.now.to_unix,
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sleep 1.minute
|
|
|
|
sleep 1.minute
|
|
|
|