lib/rocket_job/plugins/singleton.rb in rocketjob-2.1.3 vs lib/rocket_job/plugins/singleton.rb in rocketjob-3.0.0.alpha

- old
+ new

@@ -15,10 +15,10 @@ end end # Returns [true|false] whether another instance of this job is already active def rocket_job_singleton_active? - self.class.where(state: [:running, :queued], _id: {'$ne' => id}).exists? + self.class.where(:state.in => [:running, :queued], :id.ne => id).exists? end end end end