We also ran into this bug and traced it down to the collectMetrics function in "moveToFinished-9.lua". We set metrics.maxDataPoints to 1. In moveToFinished, collectMetrics tries to add the current metric and also fill in zero values for all the missed seconds, and then trims that list down to maxDataPoints. If a queue sees no jobs for enough time, and then processes a job and tries to update its metrics, the unpack() with one metric and many zeros fails with error "too many results to unpack".
Description
See https://github.com/OptimalBits/bull/issues/2709 for reference
We also ran into this bug and traced it down to the
collectMetrics
function in "moveToFinished-9.lua". We setmetrics.maxDataPoints
to 1. InmoveToFinished
,collectMetrics
tries to add the current metric and also fill in zero values for all the missed seconds, and then trims that list down tomaxDataPoints
. If a queue sees no jobs for enough time, and then processes a job and tries to update its metrics, theunpack()
with one metric and many zeros fails with error "too many results to unpack".https://github.com/OptimalBits/bull/blob/886d7643819dcf52902d2e92394267dbd495c71b/lib/commands/moveToFinished-9.lua#L70
Since the metric
prevTS
is not updated, all following jobs in the queue also throw the error.Bull version
4.16.0