coney_island 0.10.5 → 0.10.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coney_island/job.rb +7 -0
- data/lib/coney_island/version.rb +1 -1
- data/lib/coney_island/worker.rb +7 -10
- data/test/dummy/log/test.log +4 -0
- 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: d4bc7fd9c381edf6bab4e5d22de63964dc3b8086
|
4
|
+
data.tar.gz: e7e946605aaa6018311eb46be4dc27806ef96c1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d3d208d00b1727e806514cadf28eafcd045f80fe99d4e0698d4251b48f8eb8ce50b5b35c7426c41dd3ffc0138d230333e6571ec9b36bdd42f7db881e6e41ab0
|
7
|
+
data.tar.gz: 18f4b5df5b2cc18c4d1e81118e1ec5688de711febfabc46fffb82cbace13a67404ff55a05796283592162efd57e456c26155e92c9774afcd9c1faafa51fd2304
|
data/lib/coney_island/job.rb
CHANGED
@@ -31,6 +31,13 @@ module ConeyIsland
|
|
31
31
|
else
|
32
32
|
@object = @klass
|
33
33
|
end
|
34
|
+
rescue Exception => e
|
35
|
+
metadata.ack if !ConeyIsland.running_inline?
|
36
|
+
log.error("Error initializing with args #{args}:")
|
37
|
+
log.error(e.message)
|
38
|
+
log.error(e.backtrace.join("\n"))
|
39
|
+
ConeyIsland.poke_the_badger(e, {message: "Error during job initialization, bailing out", work_queue: self.ticket, job_payload: args})
|
40
|
+
log.info("finished job #{id}")
|
34
41
|
end
|
35
42
|
|
36
43
|
def ticket
|
data/lib/coney_island/version.rb
CHANGED
data/lib/coney_island/worker.rb
CHANGED
@@ -161,16 +161,13 @@ module ConeyIsland
|
|
161
161
|
end
|
162
162
|
|
163
163
|
def self.handle_incoming_message(metadata,payload)
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
ConeyIsland.poke_the_badger(e, {code_source: 'ConeyIsland', job_payload: args})
|
172
|
-
self.log.error("ConeyIsland code error, not application code:\n#{e.inspect}\nARGS: #{args}")
|
173
|
-
end
|
164
|
+
args = JSON.parse(payload)
|
165
|
+
job = Job.new(metadata, args)
|
166
|
+
job.handle_job
|
167
|
+
rescue Exception => e
|
168
|
+
metadata.ack if !ConeyIsland.running_inline?
|
169
|
+
ConeyIsland.poke_the_badger(e, {code_source: 'ConeyIsland', job_payload: args})
|
170
|
+
self.log.error("ConeyIsland code error, not application code:\n#{e.inspect}\nARGS: #{args}")
|
174
171
|
end
|
175
172
|
|
176
173
|
def self.handle_missing_children
|
data/test/dummy/log/test.log
CHANGED
@@ -24,3 +24,7 @@ ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
|
|
24
24
|
Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
|
25
25
|
Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
|
26
26
|
ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
|
27
|
+
Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
|
28
|
+
ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
|
29
|
+
Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
|
30
|
+
ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
|
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.10.
|
4
|
+
version: 0.10.6
|
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: 2015-
|
13
|
+
date: 2015-04-02 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|