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.
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.