Skip to content

Releases: actionhero/node-resque

v7.0.4

23 Apr 04:30

Choose a tag to compare

connectionOptions.scanCount (#330)

Allows the setting of connectionOptions.scanCount to increase the number of keys scanned by each iteration of connection.getKeys. On large datasets, this will improve the performance of queue.allDelayed(), queue.locks(), queue.stats() and even scheduler polling can get very slow, taking over 30 seconds. This is because redis.scan() gets invoked hundreds of thousands of times when connection.getKeys() gets called. connection.getKeys() uses the SCAN command in Redis. When using SCAN, the COUNT parameter is set to 10 by default.

const connectionDetails = {
  host: "127.0.0.1",
  password: null,
  port: 6379,
  database: 0
  scanCount: 1000 // <-- New!
};

const queue = new Queue({ connection: connectionDetails }, jobs);
await queue.connect();
await queue.stats()

Misc

  • Extend docker example to use typescript (#343)
  • resque-web: support RAILS_RESQUE_REDIS env (#344)

v7.0.3

06 Apr 19:27

Choose a tag to compare

  • update prettier and lint rules (#331)
  • test node v13 and use redis v5 (#332)
  • Remove jobs definition of producer example (#333)
  • process.nextTick() takes callback as argument (#336)
  • Code style fixes (#338)
  • Update README.md (#339)
  • update deps (#341)

v7.0.2

16 Mar 15:13

Choose a tag to compare

  • Schedule should also watch delayed_queue_schedule #329
  • Update Dependencies

v7.0.1

20 Feb 16:33

Choose a tag to compare

Update Dependencies

See fe629db

v7.0.0

20 Feb 16:25

Choose a tag to compare

Rename Master to Leader (#323)

While no underlying functionality has changed, this is a breaking change due to the new names of events/emitters

  • Updated effected event handlers from master to leader
  • Updated README.md to reflect the change from master to leader
  • Any changes to import statements are them being reordered via TypeScript Hero
  • Fixed typo in __tests__/utils/specHelper.ts, object was named SpecHeloer, changed to SpecHelper

Docker examples (#321)

v6.0.9

16 Feb 23:56

Choose a tag to compare

Emit Duration (#320)

We now emit duration for success and failure events:

 worker.on("success", (queue, job, result, duration) => {
    console.log(
      `job success ${queue} ${JSON.stringify(job)} >> ${result} (${duration}ms)`
    );
  });

  worker.on("failure", (queue, job, failure, duration) => {
    console.log(
      `job failure ${queue} ${JSON.stringify(
        job
      )} >> ${failure} (${duration}ms)`
    );
  });

v6.0.8

15 Feb 02:50
e775f20

Choose a tag to compare

Use multi transactions to increase safety with delayed jobs (#318)

We now uses Redis transactions (with multi) when enqueuing a delayed job and deleting a delayed job queue.

We need to invoke the "watch" command by the scheduler to be notified of any changes to the delayed queue we are about to delete. Then we check that its length is 0. If it isn't we exit. If it is, we start preparing the new multi() command to delete the queue and its entry in delayed_queue_schedule. If a new job is inserted while we are doing this, the "watch" command will prevent the delete from succeeding.

Otherwise, even in the race condition when a job is being added to the same delayed queue that is being removed, the scheduler will remove the queue and entry in delayed_queue_schedule, and then the enqueue will add it back again.

v6.0.7

16 Jan 19:16

Choose a tag to compare

  • Update dependancies to latest versions
  • update type of JobEmit to include args

v6.0.6

13 Dec 16:31

Choose a tag to compare

  • move @jest/types to devDependancies (#310)
  • update docs
  • Better document the types of emitters

v6.0.4

26 Nov 17:55

Choose a tag to compare

Types Updates

  • Export Job, ConnectionOptions, and ErrorPayload
  • Include event types for Worker, Scheduler, Queue, and Multiworker

Thanks to https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node-resque/index.d.ts for lots of hints