Remove unsupported Influx/Grafana analytics code

This commit is contained in:
Ske 2018-10-11 11:23:20 +02:00
parent c15eddcfa1
commit 2f728e09aa
5 changed files with 3 additions and 133 deletions

View file

@ -8,7 +8,6 @@ import asyncpg
import asyncpg.exceptions
from discord.utils import snowflake_time
from pluralkit import stats
from pluralkit.system import System
from pluralkit.member import Member
@ -29,12 +28,8 @@ def db_wrap(func):
after = time.perf_counter()
logger.debug(" - DB call {} took {:.2f} ms".format(func.__name__, (after - before) * 1000))
# TODO: find some way to give this func access to the bot's stats object
#await stats.report_db_query(func.__name__, after - before, True)
return res
except asyncpg.exceptions.PostgresError:
#await stats.report_db_query(func.__name__, time.perf_counter() - before, False)
logger.exception("Error from database query {}".format(func.__name__))
return inner