mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Fix webhook stat reporting
This commit is contained in:
parent
4becc8a4e9
commit
05cf04df03
1 changed files with 6 additions and 0 deletions
|
|
@ -32,6 +32,9 @@ class PluralKitBot:
|
|||
self.stats = NullStatCollector()
|
||||
|
||||
self.channel_logger = channel_logger.ChannelLogger(self.client)
|
||||
|
||||
# "stats" passed here will be a NullStatsCollector, will get overwritten inside
|
||||
# the Proxy object when the actual connection occurs
|
||||
self.proxy = proxy.Proxy(self.client, token, self.channel_logger, self.stats)
|
||||
|
||||
async def on_error(self, evt, *args, **kwargs):
|
||||
|
|
@ -136,6 +139,9 @@ class PluralKitBot:
|
|||
os.environ["INFLUX_DB"]
|
||||
)
|
||||
|
||||
# Overwrite the NullCollector passed to proxy
|
||||
self.proxy.stats = self.stats
|
||||
|
||||
self.logger.info("Starting periodical stat reporting...")
|
||||
asyncio.get_event_loop().create_task(self.periodical_stat_timer(self.pool))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue