Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
If QueueEventsOptions lastEventId is not set to `$`, it replays the full (all-time) event history on process restart #76
@stansv https://github.com/taskforcesh/bullmq/blob/master/src/classes/queue-events.ts#L29 is
update: I found
In my use case, replaying those events immediately in a loop on process restart actually blocks a server from binding to a port until those hundred events have been processed. It's probably a different Issue that event processing should be on a setTimeout(,0)/setImmediate/process.nextTick, not in a blocking loop in
@jbr the code above regarding XTRIM is for internal delayed jobs events, 100 is a extremely safe value so that we do not need to rely on watchdogs as we had in Bull3.
Regarding QueueEVents, the workaround is to pass '$' to only receive new events. I thought I had changed that already but for some reason is not the default value yet.