No commit activity in last 3 years
No release in over 3 years
Just call remove_scheduled method and pass the argument to the worker to remove scheduled jobs. No need to store Job Ids
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

SidekiqRemoveScheduled

Gem Version

This gem help to remove sidekiq scheduled jobs by maintaining all job ids. Just pass the arguments and this gem will take care of it.

Installation

Add this line to your application's Gemfile:

gem 'sidekiq_remove_scheduled'

Config this gem using following command

SidekiqRemoveScheduled::Redis.config(host: 'localhost', port: '6379')

You can also add a logger.

SidekiqRemoveScheduled::Logger.set(Rails.logger) # You can pass any logger object

Then bind this gem with your sidekiq

SidekiqRemoveScheduled.bind # Run this command after all configuration

Usage

For any worker

class TestWorker
  include Sidekiq::Worker

  def perform(arg1, arg2)
    puts "#{agr1} #{arg2}"
  end
end

If any job is enqueued as

TestWorker.perform_in(5.minutes, "hello", "world")

Then dequeue this job using

TestWorker.remove_scheduled("hello", "world")

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request