From b8a8d1e4af37252b3ddbceb6005423b2b6804a89 Mon Sep 17 00:00:00 2001 From: xtaodada Date: Tue, 2 Aug 2022 21:49:47 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20hotfix:=20mixpanel=20as?= =?UTF-8?q?ync?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagermaid/modules/mixpanel.py | 4 ++-- requirements.txt | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pagermaid/modules/mixpanel.py b/pagermaid/modules/mixpanel.py index 25fa9be..08d2b25 100644 --- a/pagermaid/modules/mixpanel.py +++ b/pagermaid/modules/mixpanel.py @@ -3,9 +3,9 @@ from pagermaid.enums import Client, Message from pagermaid.hook import Hook from mixpanel import Mixpanel +from mixpanel_async import AsyncBufferedConsumer - -mp = Mixpanel(Config.MIXPANEL_API) +mp = Mixpanel(Config.MIXPANEL_API, consumer=AsyncBufferedConsumer()) @Hook.on_startup() diff --git a/requirements.txt b/requirements.txt index 852e3fb..2b8d3a7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,5 @@ apscheduler sqlitedict casbin==1.16.11 mixpanel +mixpanel-py-async sentry-sdk==1.9.0