resque-locket 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  module Resque
2
2
  module Plugins
3
3
  module Locket
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -26,7 +26,7 @@ module Resque
26
26
 
27
27
  job = reserve_and_clear_without_counter
28
28
 
29
- redis.del("locket:queue_lock_counters") if job == nil
29
+ redis.del("locket:queue_lock_counters") if job.nil?
30
30
 
31
31
  job
32
32
  end
@@ -30,6 +30,16 @@ describe Resque::Plugins::Locket::Worker do
30
30
 
31
31
  Resque.redis.exists("locket:queue_lock_counters").should be_false
32
32
  end
33
+
34
+ it "doesn't clear the lock counter if a job was reserved" do
35
+ Resque.redis.hset("locket:queue_lock_counters", all_queues.first, 1)
36
+ fake_job = Resque::Job.new(:jobs, "class" => "GoodJob", "args" => "stuffs")
37
+
38
+ Resque.stub(:reserve).and_return(fake_job)
39
+ worker.reserve
40
+
41
+ Resque.redis.exists("locket:queue_lock_counters").should be_true
42
+ end
33
43
  end
34
44
 
35
45
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-locket
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-11 00:00:00.000000000 Z
12
+ date: 2013-10-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: resque