Skip to content

Releases: taylorchu/work

v0.1.12

13 Jul 18:02
44be6e8
Compare
Choose a tag to compare
  • add worker.RunOnce. This is useful for external schedulers like k8s. The k8s scheduler will start a pod, and this pod only runs a job.
  • add custom retry strategy
  • update dependencies

v0.1.11

15 May 00:00
90a1020
Compare
Choose a tag to compare
  • breaking change: sidekiq queue needs to explicitly pull to move jobs from sidekiq ({ns1}:low) to work-compatible queue ({ns1}:low:SomeWorker).
	q.Pull(&PullOptions{
		Namespace:        "{ns1}",
		SidekiqNamespace: "{ns1}",
		SidekiqQueue:     "low",
	})

SidekiqNamespace can be empty if you don't use redis-namespace. In that case, the sidekiq queue source is low instead of {ns1}:low.

v0.1.10

18 Apr 18:53
4d17b15
Compare
Choose a tag to compare
  • if context handler is used, worker.Stop will be able to quickly stop current job execution.
  • add external enqueuer interface to enqueue job into other queue systems.
// ExternalEnqueuer enqueues a job with other queue protocol.
// Queue adaptor that implements this can publish jobs directly to other types of queue systems.
type ExternalEnqueuer interface {
	ExternalEnqueue(*Job, *EnqueueOptions) error
}
  • sidekiq.Queue implements work.ExternalEnqueuer

v0.1.9

03 Mar 02:47
477b588
Compare
Choose a tag to compare
  • use error func only for redis errors

v0.1.8

19 Jan 23:01
5604683
Compare
Choose a tag to compare
  • add redis cluster tests
  • use errors.is instead of direct comparison

v0.1.7

06 Dec 03:18
78a4fef
Compare
Choose a tag to compare
  • add discard max retry middleware

v0.1.6

22 Nov 06:45
Compare
Choose a tag to compare
  • revert to previous max backoff interval

v0.1.5

22 Nov 02:25
Compare
Choose a tag to compare
  • add more sidekiq fields related to retries
  • fix backoff after upgrading to cenkalti/backoff/v4

v0.1.4

19 Nov 22:57
5ccb61e
Compare
Choose a tag to compare
  • redis queue supports bulk job finder interface (#40)
  • support context.Context in job handler (#41)
  • test against go 1.15 and redis 6 (#42)
  • add "Do not retry" error (#39) (handler returns an error, but it will not trigger default exponential backoff. you can use it to implement custom backoff algorithm by reenqueuing)
  • add redislock package for future custom ratelimit package (#45)

v0.1.3

22 Oct 23:58
4c1939e
Compare
Choose a tag to compare
  • dependency update
  • remove pkg/errors from dependencies