Created by: xdc0
This PR moves Queue#clean
to a script for performance purposes.
The test case to measure performance was to create 20,000 jobs, then issue a regular Queue#clean
call, I measured how long it took in my machine to add the jobs and then the cleaning, these are just one sample of the tests I ran
Current implementation: adding-jobs: 2657ms cleaning-jobs: 23515ms
With this PR adding-jobs: 2658ms cleaning-jobs: 3708ms
I wanted to keep the script as simple as possible, I'm not 100% well versed on redis lua scripts, so please review for any potential bug on it.
Thanks!