coney_island 0.10.6 → 0.10.7
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.
- checksums.yaml +4 -4
- data/lib/coney_island/job.rb +3 -1
- data/lib/coney_island/version.rb +1 -1
- data/lib/coney_island/worker.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 283cf2950b43c43a2d10dde4339f4375bead222d
|
4
|
+
data.tar.gz: 1b0e8e472b604abec938d58c959561defdb98347
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2768563c08726e7ee948fe748314a693af5f3dceadd15c03ee37800f03ebbc277ee7be65db29796ded2d1fd9cc62ac1403eab83a5f5745db4a0ed4d041da162
|
7
|
+
data.tar.gz: 3a2dc8647cb309ebe3599c575ed0875fcaf55fef2da33b0dc745a69c1756c4c010341b977dc1cb30ced1631190ef4cfcf2553c3e53ea55cf714f679a6d032e2f
|
data/lib/coney_island/job.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
module ConeyIsland
|
2
2
|
class Job
|
3
3
|
attr_accessor :delay, :timeout, :method_name, :class_name, :klass, :method_args, :id, :args,
|
4
|
-
:instance_id, :object, :metadata, :attempts, :retry_limit, :retry_on_exception
|
4
|
+
:instance_id, :object, :metadata, :attempts, :retry_limit, :retry_on_exception,
|
5
|
+
:initialization_errors
|
5
6
|
|
6
7
|
def initialize(metadata, args)
|
7
8
|
@args = args
|
@@ -33,6 +34,7 @@ module ConeyIsland
|
|
33
34
|
end
|
34
35
|
rescue Exception => e
|
35
36
|
metadata.ack if !ConeyIsland.running_inline?
|
37
|
+
self.initialization_errors = true
|
36
38
|
log.error("Error initializing with args #{args}:")
|
37
39
|
log.error(e.message)
|
38
40
|
log.error(e.backtrace.join("\n"))
|
data/lib/coney_island/version.rb
CHANGED
data/lib/coney_island/worker.rb
CHANGED
@@ -163,7 +163,7 @@ module ConeyIsland
|
|
163
163
|
def self.handle_incoming_message(metadata,payload)
|
164
164
|
args = JSON.parse(payload)
|
165
165
|
job = Job.new(metadata, args)
|
166
|
-
job.handle_job
|
166
|
+
job.handle_job unless job.initialization_errors
|
167
167
|
rescue Exception => e
|
168
168
|
metadata.ack if !ConeyIsland.running_inline?
|
169
169
|
ConeyIsland.poke_the_badger(e, {code_source: 'ConeyIsland', job_payload: args})
|