keenlabs / KeenClient-iOS

Official iOS client for the Keen IO API. Build analytics features directly into your iOS apps.
https://keen.io/docs
MIT License
78 stars 56 forks source link

Fix duplicated events with multiple upload calls #228

Closed baumatron closed 7 years ago

baumatron commented 7 years ago

Fix a problem where multiple calls to uploadWithFinishedBlock: can cause duplicate uploads when a subsequent call starts uploading before a prior call finishes and deletes successfully uploaded events.

baumatron commented 7 years ago

This basically rounds out the prior (partial) fix for #156.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.7%) to 67.533% when pulling f2866ef07ff712ac9b4f89563ff5df046b2cd75b on fix_duplicate_events_master into 2b7efa15ff2bbf274fca8a840cd239f5e2ec22f2 on master.

baumatron commented 7 years ago

Might take a stab at another solution for this tomorrow where in-flight events are tracked separately in the db from pending events, which seems like it would be more appropriate, though possibly a more destabilizing change.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.7%) to 67.533% when pulling b1df3cbb2183ad653465b80b39f07935e3ebcd49 on fix_duplicate_events_master into 2b7efa15ff2bbf274fca8a840cd239f5e2ec22f2 on master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+1.7%) to 67.533% when pulling b1df3cbb2183ad653465b80b39f07935e3ebcd49 on fix_duplicate_events_master into 2b7efa15ff2bbf274fca8a840cd239f5e2ec22f2 on master.