boss_queue 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/boss_queue.gemspec +1 -1
- data/lib/boss_queue/boss_queue.rb +1 -1
- data/spec/boss_queue_spec.rb +2 -2
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.7
|
data/boss_queue.gemspec
CHANGED
@@ -42,7 +42,7 @@ class BossQueue
|
|
42
42
|
def self.work
|
43
43
|
self.sqs_queue.receive_message do |job_id|
|
44
44
|
# When a block is given, each message is yielded to the block and then deleted as long as the block exits normally - http://docs.aws.amazon.com/AWSRubySDK/latest/frames.html
|
45
|
-
job = BossQueue::Job.shard(table_name).
|
45
|
+
job = BossQueue::Job.shard(table_name).find(job_id.body)
|
46
46
|
job.queue_name = self.queue_name
|
47
47
|
job.work
|
48
48
|
end
|
data/spec/boss_queue_spec.rb
CHANGED
@@ -218,7 +218,7 @@ describe "BossQueue module" do
|
|
218
218
|
@job = double('job')
|
219
219
|
@job.stub(:work)
|
220
220
|
@job.stub(:queue_name=)
|
221
|
-
BossQueue::Job.stub_chain(:shard, :
|
221
|
+
BossQueue::Job.stub_chain(:shard, :find).and_return(@job)
|
222
222
|
end
|
223
223
|
|
224
224
|
it "should dequeue from SQS" do
|
@@ -231,7 +231,7 @@ describe "BossQueue module" do
|
|
231
231
|
@queue.should_receive(:receive_message).and_yield(@sqs_message)
|
232
232
|
shard = double('shard')
|
233
233
|
BossQueue::Job.should_receive(:shard).with(BossQueue.table_name).and_return(shard)
|
234
|
-
shard.should_receive(:
|
234
|
+
shard.should_receive(:find).with('ijk').and_return(@job)
|
235
235
|
BossQueue.work
|
236
236
|
end
|
237
237
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boss_queue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
segments:
|
162
162
|
- 0
|
163
|
-
hash:
|
163
|
+
hash: 3310499517361875284
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
none: false
|
166
166
|
requirements:
|