lib/sidekiq_snitch.rb in sidekiq_snitch-1.2.0 vs lib/sidekiq_snitch.rb in sidekiq_snitch-1.3.0
- old
+ new
@@ -1,4 +1,8 @@
require "sidekiq_snitch/engine"
+require 'sidekiq/api'
module SidekiqSnitch
+ def self.scheduled?
+ Sidekiq::ScheduledSet.new.any? {|job| job.klass == "Sidekiq::Snitch" }
+ end
end