OriginProtocol / origin-bridge

We've moved to a monorepo: https://github.com/OriginProtocol/origin/tree/master/infra/bridge
MIT License
15 stars 7 forks source link

Indexing service processes the last event more than once #63

Closed franckc closed 6 years ago

franckc commented 6 years ago

Currently the indexing service stores the block number of the last event successfully processed in the event_tracker table. On the subsequent run of the event_listener() loop, it fetches events starting at that block number. This results in the last successful event to be processed twice or even multiple times. Among other things this has the undesirable effect that multiple notifications for that event would get delivered to the end-user.

To reproduce, add some debug statement to print events being processed and start the celery scheduler+worker.

The fix could be as simple as fetching events starting from block n+1. Or to have a database table where we check which event was already processed before attempting to process it again.

Gzing commented 6 years ago

Closed by #72