sqewer 2.0.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sqewer/execution_context.rb +4 -2
- data/lib/sqewer/submitter.rb +2 -4
- data/lib/sqewer/version.rb +1 -1
- data/spec/sqewer/submitter_spec.rb +0 -16
- data/sqewer.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 376905158864071505965ba29e27d67552fed4dc
|
4
|
+
data.tar.gz: 1cffb36287c14210508ca0c36357109fd9862c3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7669344c1b8c11aacac7ca2d7ba7e6792301fb4711cb4c9de4c4b3cbaf6eb2157ddfe96fec137433cb12279214ab948f349af340629bf2ae1909c46050200fd9
|
7
|
+
data.tar.gz: e2ef1bf783999d3b8fab81c86be905be543ac34a7887adc21eaf39cb7096b44e8cc150ea0698bae5571d2c40dae5de2021c95cb2da7a972ff94f96b171eab825
|
@@ -16,8 +16,10 @@ class Sqewer::ExecutionContext
|
|
16
16
|
end
|
17
17
|
|
18
18
|
# Submits one or more jobs to the queue
|
19
|
-
|
20
|
-
|
19
|
+
#
|
20
|
+
# @see {Sqewer::Submitter#submit!}
|
21
|
+
def submit!(job, **execution_options)
|
22
|
+
@submitter.submit!(job, **execution_options)
|
21
23
|
end
|
22
24
|
|
23
25
|
# Sets a key in the execution environment
|
data/lib/sqewer/submitter.rb
CHANGED
@@ -10,9 +10,7 @@ class Sqewer::Submitter < Struct.new(:connection, :serializer)
|
|
10
10
|
new(Sqewer::Connection.default, Sqewer::Serializer.default)
|
11
11
|
end
|
12
12
|
|
13
|
-
def submit!(
|
14
|
-
|
15
|
-
connection.send_message(serializer.serialize(job), **kwargs_for_send)
|
16
|
-
end
|
13
|
+
def submit!(job, **kwargs_for_send)
|
14
|
+
connection.send_message(serializer.serialize(job), **kwargs_for_send)
|
17
15
|
end
|
18
16
|
end
|
data/lib/sqewer/version.rb
CHANGED
@@ -39,21 +39,5 @@ describe Sqewer::Submitter do
|
|
39
39
|
subject = described_class.new(fake_connection, fake_serializer)
|
40
40
|
subject.submit!(:some_object, delay_seconds: 5)
|
41
41
|
end
|
42
|
-
|
43
|
-
|
44
|
-
# TODO: should use batched sends
|
45
|
-
it 'unsplats the array of jobs and sends them one by one' do
|
46
|
-
fake_serializer = double('Some serializer')
|
47
|
-
expect(fake_serializer).to receive(:serialize).at_least(5).times {|object_to_serialize|
|
48
|
-
expect(object_to_serialize).not_to be_nil
|
49
|
-
'serialized-object-data'
|
50
|
-
}
|
51
|
-
|
52
|
-
fake_connection = double('Some SQS connection')
|
53
|
-
expect(fake_connection).to receive(:send_message).at_least(5).times.with('serialized-object-data', {})
|
54
|
-
|
55
|
-
subject = described_class.new(fake_connection, fake_serializer)
|
56
|
-
subject.submit!(:one, :two, :three, :four, :five)
|
57
|
-
end
|
58
42
|
end
|
59
43
|
end
|
data/sqewer.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: sqewer
|
5
|
+
# stub: sqewer 3.0.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "sqewer"
|
9
|
-
s.version = "
|
9
|
+
s.version = "3.0.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Julik Tarkhanov"]
|
14
|
-
s.date = "2016-01-
|
14
|
+
s.date = "2016-01-25"
|
15
15
|
s.description = "Process jobs from SQS"
|
16
16
|
s.email = "me@julik.nl"
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk
|