mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-14 09:40:10 +00:00
Add occasional basic stat reporting to InfluxDB
This commit is contained in:
parent
ec5a023348
commit
f50a08b50b
3 changed files with 37 additions and 0 deletions
|
|
@ -242,6 +242,14 @@ async def member_count(conn):
|
|||
async def system_count(conn):
|
||||
return await conn.fetchval("select count(*) from systems")
|
||||
|
||||
@db_wrap
|
||||
async def message_count(conn):
|
||||
return await conn.fetchval("select count(*) from messages")
|
||||
|
||||
@db_wrap
|
||||
async def account_count(conn):
|
||||
return await conn.fetchval("select count(*) from accounts")
|
||||
|
||||
async def create_tables(conn):
|
||||
await conn.execute("""create table if not exists systems (
|
||||
id serial primary key,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue