Skip to content
Discussion options

You must be logged in to vote

Nothing is being filtered — the condition works the opposite way round from how you have read it, and that inversion produces something that looks exactly like dropping.

From src/transforms/delay.rs, when an event arrives:

Some(event) => {
    let (result, event) = self.check_condition(event, true);
    if result {
        yield event
    } else {
        // ... queued with self.delay

and when a queued event's timer expires:

let (result, event) = self.check_condition(event, false);
if result {
    yield event;
} else {
    self.queue.insert(event, self.delay);
}

So the condition is a release gate, not a selector for what to delay. An event matching the condition is emitted immediately, wi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pront
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants