Sha256: a1335d25e20fa2329877e881812f2f699fe31669145fbe165533f9296d1846dc
Contents?: true
Size: 901 Bytes
Versions: 3
Compression:
Stored size: 901 Bytes
Contents
class SlowJob extend Resque::Plugins::LockTimeout @queue = :test def self.perform $success += 1 sleep 0.2 end def self.lock_failed(*args) $lock_failed += 1 end end class FastJob extend Resque::Plugins::LockTimeout @queue = :test def self.perform $success += 1 end def self.lock_failed(*args) $lock_failed += 1 end end class FailingFastJob extend Resque::Plugins::LockTimeout @queue = :test def self.perform raise $success += 1 end end class SlowWithTimeoutJob extend Resque::Plugins::LockTimeout @queue = :test @lock_timeout = 60 def self.perform $success += 1 sleep 0.2 end end class ExpireBeforeReleaseJob extend Resque::Plugins::LockTimeout @queue = :test @lock_timeout = 1 def self.perform $success += 1 sleep 2 end def self.lock_expired_before_release $lock_expired = true end end
Version data entries
3 entries across 3 versions & 2 rubygems
Version | Path |
---|---|
resque-lock-timeout-process-aware-0.1.1 | test/test_jobs.rb |
resque-lock-timeout-0.2.1 | test/test_jobs.rb |
resque-lock-timeout-0.2.0 | test/test_jobs.rb |