coney_island 0.10.7 → 0.11.0
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 +5 -3
- data/lib/coney_island/version.rb +1 -1
- data/test/dummy/log/test.log +2 -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: 7cd453ef44683112b719619cb03fa5b998e1467c
|
4
|
+
data.tar.gz: 78093b8c5e994216d65cdbc9c47c31b3643a8fea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0144d626a9db36ff167fa8ddba08669138f4edbdf9e6f9cc42686d09626a2b2a303e7480579e88a379c72381a19de00d67db72404d95a999465a9fa34760de75
|
7
|
+
data.tar.gz: 87ad04598f5b5eaf43a2c885ea8e062c77a98c76159a677ea7560e890f9cbc2a454b91b88c9828aa921f723643dbafb36d90ffa3b4c6b97ecef9ed55b09cd49a
|
data/lib/coney_island/job.rb
CHANGED
@@ -2,12 +2,13 @@ module ConeyIsland
|
|
2
2
|
class Job
|
3
3
|
attr_accessor :delay, :timeout, :method_name, :class_name, :klass, :method_args, :id, :args,
|
4
4
|
:instance_id, :object, :metadata, :attempts, :retry_limit, :retry_on_exception,
|
5
|
-
:initialization_errors
|
5
|
+
:initialization_errors, :dont_log
|
6
6
|
|
7
7
|
def initialize(metadata, args)
|
8
8
|
@args = args
|
9
9
|
@id = SecureRandom.uuid
|
10
|
-
|
10
|
+
@dont_log = args['dont_log']
|
11
|
+
self.log.info ("Starting job #{@id}: #{@args}") unless self.dont_log
|
11
12
|
@delay = args['delay'].to_i if args['delay']
|
12
13
|
@timeout = args['timeout']
|
13
14
|
@method_name = args['method_name']
|
@@ -19,6 +20,7 @@ module ConeyIsland
|
|
19
20
|
@attempts = args['attempt_count'] || 1
|
20
21
|
@retry_limit = args['retry_limit'] || 3
|
21
22
|
@retry_on_exception = args['retry_on_exception']
|
23
|
+
|
22
24
|
@metadata = metadata
|
23
25
|
if @klass.respond_to? :coney_island_settings
|
24
26
|
@delay ||= @klass.coney_island_settings[:delay]
|
@@ -100,7 +102,7 @@ module ConeyIsland
|
|
100
102
|
|
101
103
|
def finalize_job
|
102
104
|
metadata.ack if !ConeyIsland.running_inline?
|
103
|
-
log.info("finished job #{id}")
|
105
|
+
log.info("finished job #{id}") unless self.dont_log
|
104
106
|
ConeyIsland::Worker.running_jobs.delete self
|
105
107
|
end
|
106
108
|
|
data/lib/coney_island/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -28,3 +28,5 @@ Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
|
|
28
28
|
ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
|
29
29
|
Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
|
30
30
|
ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
|
31
|
+
ConeyIsland::Submitter.submit! about to iterate over this many jobs: 1
|
32
|
+
Failed to connecto to RabbitMQ Attempt #1 time(s), trying again in 0 seconds...
|
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.
|
4
|
+
version: 0.11.0
|
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-04-
|
13
|
+
date: 2015-04-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|