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

I released a new gem - GitHub - fatkodima/sidekiq-expiring-jobs: Expiring jobs support for Sidekiq.

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+.

1 Like