RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Announcing sidekiq-expiring-jobs - a gem that adds expiring jobs support to Sidekiq

I released a new gem - https://github.com/fatkodima/sidekiq-expiring-jobs

Note: Sidekiq Pro has this feature, so please consider upgrading if you can.

Is useful when you want to discard pointless/slow/dangerous/etc enqueued jobs that did not started on time.

Example use cases:

  1. Perhaps you want to expire a cache which has a TTL of 30 minutes with a Sidekiq job. If the job doesn’t process successfully within 30 minutes, there’s no point in executing the job.
  2. You use a Sidekiq job to send a daily digest email. If the job doesn’t execute within 24 hours, perhaps you want to skip that day as the user might only care about the latest digest.
  3. You enqueue periodically a Sidekiq job to do some task. If the job doesn’t execute before the next period begins, you may skip that job as the newly enqueued job will do the task.

Supports ruby 2.7+ and Sidekiq 6.0+.

Comments

Maybe link auto detection messed up the link

https://github.com/fatkodima/sidekiq-expiring-jobs (no trailing dot)

Thank you! Removed that.

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in