node-resque v7.0.4 Release Notes
Release Date: 2020-04-23 // about 4 years ago-
connectionOptions.scanCount (#330)
👍 Allows the setting of
connectionOptions.scanCount
to increase the number of keys scanned by each iteration ofconnection.getKeys
. On large datasets, this will improve the performance ofqueue.allDelayed()
,queue.locks()
,queue.stats()
and even scheduler polling can get very slow, taking over 30 seconds. This is becauseredis.scan()
gets invoked hundreds of thousands of times whenconnection.getKeys()
gets called.connection.getKeys()
uses theSCAN
command in Redis. When usingSCAN
, theCOUNT
parameter is set to 10 by default.const connectionDetails = { host: "127.0.0.1", password: null, port: 6379, database: 0scanCount: 1000 // \<-- New!};const queue = new Queue({ connection: connectionDetails }, jobs);await queue.connect();await queue.stats()
Misc