Skip to content

Release v0.6.0

Compare
Choose a tag to compare
@sudo-suhas sudo-suhas released this 09 Mar 11:43
· 29 commits to master since this release
bc58564

Important Changes

Usage

go get github.com/gocraft/work && \
  go mod edit -replace github.com/gocraft/work=github.com/gojek/[email protected] && \
  go mod tidy

Refresh Node.js dependencies for WebUI (99f237a).

This fixes multiple security vulnerabilities.

Requeue in progress jobs and clean stale lock info on stop (#1).

In case there is a failover with a Redis Sentinel cluster with data loss, there can be stale lock information which can cause job processing to be stuck if the max concurrency limit is reached. Therefore, the jobs which were in progress are re-enqueued, and the stale lock info for the worker pool is cleaned up.

NOTE: This is only necessary for worker instance with Sentinel Redis setup, in conjunction with max concurrency being defined for jobs.

⚠️WARNING: This can result in jobs being executed multiple times as we re-enqueue the jobs from in-progress queue. It is possible that the job was actually processed successfully by the worker, but the change for removing from in-progress queue was lost.

Expose lock count & max concurrency for each job (#2)

Added to the queue info accessible from work.Client.Queues(). Useful for alerting when lock count is consistently equal to the max concurrency possibly indicating that stale lock count is resulting in jobs not being picked up.

For the cleanup to be thorough, work.(*WorkerPool).Stop would need to be called on each worker pool instance.