coney_island 0.14.0 → 0.14.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad987b88af8e85b48fd63cbeddad3e131203b65b
4
- data.tar.gz: 821581cc67935f4b287b75a4c5932634475232a6
3
+ metadata.gz: de3fb478c2730e9e2d56b20d44bb396bcb301451
4
+ data.tar.gz: 12d601f5f1b12d36411fc4a5feef23fcb16f15de
5
5
  SHA512:
6
- metadata.gz: 01203b116490b52af605167f6f854ac61a72fd37f750c73d364fd847fb4760526de6f814f67a970bd852c47dffab4af2ea499f9c44f927c7ee6039be0a6b3020
7
- data.tar.gz: 02ba62d6b4d086a229abb37b6c18558e28bd06eb82c3efbce049344ebd844ad1054bd2e3a1050a75ea8a4740a10fde460a6f054ae396179aa1ee4f47c249909f
6
+ metadata.gz: 6fbfce656d1425476b82e91b3b6bc3fb81fbe065d2378e05142d34b0be29d857d1b49bdef9357ab761d73dcee55f675c6454ce86b750f1e3170c476c22c688f2
7
+ data.tar.gz: 2ccc1e34070456caeaecc55b4f7f87469eda7e959824cbf0f42898c4932cb4f2a23183e9ceea708ef20ce431f26e47b414fb82ba293b15a79eafbd19f33d2468
@@ -17,6 +17,9 @@ module ConeyIsland
17
17
  @class_name = args['klass']
18
18
  @klass = @class_name.constantize
19
19
  @method_args = args['args']
20
+ if @method_args.is_a? Hash # The whole args is keyword args
21
+ @method_args.symbolize_keys!
22
+ end
20
23
  # Symbolize hash keys for consistency and keyword arguments
21
24
  @method_args.each { |v| v.symbolize_keys! if v.is_a?(Hash) } if !!@method_args
22
25
  @attempts = args['attempt_count'] || 1
@@ -58,8 +61,14 @@ module ConeyIsland
58
61
  end
59
62
 
60
63
  def execute_job_method
61
- if method_args.present? and method_args.length > 0
62
- object.send method_name, *method_args
64
+ if method_args.present? && method_args.length > 0
65
+ # The whole args is keyword args, just pass it as is
66
+ if method_args.is_a? Hash
67
+ object.send method_name, method_args
68
+ else
69
+ # Splat the array into args
70
+ object.send method_name, *method_args
71
+ end
63
72
  else
64
73
  object.send method_name
65
74
  end
@@ -1,3 +1,3 @@
1
1
  module ConeyIsland
2
- VERSION = "0.14.0"
2
+ VERSION = "0.14.1"
3
3
  end
@@ -1709,3 +1709,22 @@ Submitting job : [TestModel, :add_to_list, {:args=>[[]]}]
1709
1709
  Submitting job : [TestModel, :add_to_list, {:args=>[[]], :work_queue=>"my-queue"}]
1710
1710
  Submitting job 07326aa1-477a-4a3f-99fe-5b2f3092bfc4: [TestModel, :add_to_list, {:args=>[[]]}]
1711
1711
  Submitting job : [TestModel, :add_to_list, {:args=>[[]]}]
1712
+ Submitting job 11fab165-0f82-435d-8eac-0f59e9ae6573: [TestModel, :add_to_list, {:args=>[[]]}]
1713
+ Submitting job : [TestModel, :add_to_list, {:args=>[[]]}]
1714
+ Submitting job : [TestModel, :add_to_list, {:args=>[[]]}]
1715
+ ConeyIsland::Submitter.handle_connection connecting...
1716
+ Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
1717
+ ConeyIsland::Submitter.handle_connection connecting...
1718
+ Submitting job : [DummyPerformer, :perform, {:args=>nil}]
1719
+ Submitting job : [DummyPerformer, :perform, {:args=>nil, :work_queue=>"bar"}]
1720
+ Submitting job : [MyPerformer, :add_to_list, {:work_queue=>"boardwalk", :args=>[[]], :delay=>0}]
1721
+ Submitting job : [MyPerformer, :perform, {:args=>[], :delay=>0}]
1722
+ Submitting job : [MyInheritedPerformer, :perform, {:args=>[], :delay=>0}]
1723
+ Submitting job MyHighlander-increment: [MyHighlander, "increment", {:args=>[], :highlander=>true}]
1724
+ ConeyIsland::Submitter.handle_connection connecting...
1725
+ Submitting job : [TestModel, :add_to_list, {:args=>[[]]}]
1726
+ Submitting job : [TestModel, :add_to_list, {:args=>[[]], :work_queue=>"my-queue"}]
1727
+ Submitting job : [TestModel, :add_to_list, {:args=>[[]]}]
1728
+ Submitting job : [MyPerformer, "set_color", {:instance_id=>7, :args=>["sage"], :highlander=>false}]
1729
+ Submitting job : [MySingleton, "perform", {:singleton=>true, :args=>["interesting stuff"], :highlander=>false}]
1730
+ Submitting job : [MyPerformer, "set_tone", {:args=>["contemplative"], :highlander=>false}]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coney_island
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.0
4
+ version: 0.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Draut
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-08-08 00:00:00.000000000 Z
13
+ date: 2016-11-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails