Closed Dam-Buty closed 5 months ago
## Description
Should be a Run step instead of a un unknown one.
[image.png](https://uploads.linear.app/6a41a374-76e1-40c2-a405-51050761590c/8518d1f3-779b-490f-8b2e-a09237244b06/084a84d4-81a4-47db-a963-423268c56c02)
In the event processor's main loop, events are popped from the queue to a local
batch
variable. However theflush
method only checks the queue before exiting, not thebatch
variable (which isn't in its scope anyway). This was highly timing-dependent, and could allow up to 4 (batch_size - 1
) forgotten events.The fix consists of changing
batch
from a local variable to an instance attribute, and checking that attribute in theflush
method.