mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 19:57:29 +01:00
Prevent metrics roll over
This commit is contained in:
parent
c0eb10521d
commit
5fd1666a5d
@ -50,9 +50,9 @@ def generate_metrics(full=False):
|
|||||||
users = User.query.filter(User.rank != UserRank.NOT_JOINED).count()
|
users = User.query.filter(User.rank != UserRank.NOT_JOINED).count()
|
||||||
|
|
||||||
ret = ""
|
ret = ""
|
||||||
ret += write_single_stat("contentdb_packages", "Total packages", "counter", packages)
|
ret += write_single_stat("contentdb_packages", "Total packages", "gauge", packages)
|
||||||
ret += write_single_stat("contentdb_users", "Number of registered users", "counter", users)
|
ret += write_single_stat("contentdb_users", "Number of registered users", "gauge", users)
|
||||||
ret += write_single_stat("contentdb_downloads", "Total downloads", "counter", downloads)
|
ret += write_single_stat("contentdb_downloads", "Total downloads", "gauge", downloads)
|
||||||
|
|
||||||
if full:
|
if full:
|
||||||
scores = Package.query.join(User).with_entities(User.username, Package.name, Package.score) \
|
scores = Package.query.join(User).with_entities(User.username, Package.name, Package.score) \
|
||||||
|
Loading…
Reference in New Issue
Block a user