You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
370 B
18 lines
370 B
from mixpanel import Mixpanel
|
|
|
|
from django.conf import settings
|
|
|
|
from project.celery import app
|
|
|
|
|
|
@app.task
|
|
def transaction_to_mixpanel(user_id, amount, time, product_type):
|
|
mix = Mixpanel(settings.MIX_TOKEN)
|
|
mix.people_track_charge(
|
|
user_id,
|
|
amount,
|
|
{
|
|
'$time': time,
|
|
'product_type': product_type,
|
|
}
|
|
)
|
|
|