mixpanel-python icon indicating copy to clipboard operation
mixpanel-python copied to clipboard

Make Consumer and BufferedConsumer have the same interface.

Open MyGGaN opened this issue 11 years ago • 1 comments

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.

MyGGaN avatar Feb 28 '14 00:02 MyGGaN

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.

zakj avatar Mar 10 '15 00:03 zakj