monque 0.1.1 → 0.1.3

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.
Files changed (3) hide show
  1. data/lib/monque.rb +3 -4
  2. data/lib/monque/tasks.rb +2 -4
  3. metadata +4 -4
@@ -71,9 +71,9 @@ module Monque
71
71
  end
72
72
 
73
73
  class Worker
74
- def initialize(host, port, queues)
74
+ def initialize(queues)
75
75
  @queues = queues
76
- @jobs = Monque.jobs_collection(host, port)
76
+ @jobs = Monque.jobs_collection
77
77
  end
78
78
 
79
79
  def worker_id
@@ -141,7 +141,6 @@ module Monque
141
141
  job = reserve
142
142
 
143
143
  if job
144
- puts "job: #{job.inspect}"
145
144
  cls = Kernel.fetch_class(job['class'])
146
145
  $stderr.puts "#{worker_id}: processing #{job.inspect}"
147
146
  cls.send(:perform, *JSON.load(job['data']))
@@ -152,4 +151,4 @@ module Monque
152
151
  end
153
152
  end
154
153
  end
155
- end
154
+ end
@@ -1,12 +1,10 @@
1
1
  namespace :monque do
2
2
  task :work do
3
3
  raise "Must specify QUEUES env var" if ENV['QUEUES'].nil?
4
- raise "Must specify mongo host:port" if ENV['MONGO'].nil?
5
4
 
6
5
  queues = ENV['QUEUES'].split(',')
7
- mongo = ENV['MONGO'].split(':')
8
6
 
9
- worker = Monque::Worker.new(mongo[0], mongo[1], queues)
7
+ worker = Monque::Worker.new(queues)
10
8
  worker.work
11
9
  end
12
- end
10
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monque
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 29
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 3
10
+ version: 0.1.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Collison
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-03 00:00:00 +00:00
18
+ date: 2010-11-06 00:00:00 -01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21