mloughran-job_queue 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 9
2
+ :patch: 10
3
3
  :major: 0
4
4
  :minor: 0
@@ -63,7 +63,7 @@ class JobQueue::BeanstalkAdapter
63
63
  end
64
64
 
65
65
  def queue_length(queue)
66
- beanstalk_pool.stats_tube(queue)["total-jobs"]
66
+ beanstalk_pool.stats_tube(queue)["current-jobs-ready"]
67
67
  rescue Beanstalk::NotFoundError
68
68
  0
69
69
  end
@@ -58,5 +58,9 @@ shared_examples_for "JobQueue adapter queue length" do
58
58
  JobQueue.queue_length('test').should == 0
59
59
  5.times { JobQueue.put("hello", :queue => "test") }
60
60
  JobQueue.queue_length('test').should == 5
61
+ JobQueue.subscribe(:queue => "test") do |job|
62
+ throw :stop
63
+ end
64
+ JobQueue.queue_length('test').should == 4
61
65
  end
62
66
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mloughran-job_queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martyn Loughran
@@ -41,7 +41,6 @@ files:
41
41
  - spec/verbose_adapter_spec.rb
42
42
  has_rdoc: false
43
43
  homepage: http://github.com/mloughran/job_queue
44
- licenses:
45
44
  post_install_message:
46
45
  rdoc_options:
47
46
  - --inline-source
@@ -63,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
62
  requirements: []
64
63
 
65
64
  rubyforge_project:
66
- rubygems_version: 1.3.5
65
+ rubygems_version: 1.2.0
67
66
  signing_key:
68
67
  specification_version: 3
69
68
  summary: JobQueue means you don't have to worry about your queue any more!