mixpanel-python
mixpanel-python copied to clipboard
Make Consumer and BufferedConsumer have the same interface.
It should be possible to switch between the two consumer classes provided without any code change. Currently you'll run into issues if you have implemented the BufferedConsumer, with calls to flush() where appropriate, and then, for some reason, goes back to the default Consumer.
My suggestion is to simply add a dummy flush() method to Consumer. I made it static since it doesn't use self and it works great with inheritance too.
Great point! Thanks for this; we've got some other Consumer changes I need to review but I will be sure this goes out in the next release.