simple_job 0.12.1 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.rdoc +4 -0
- data/lib/simple_job/sqs_job_queue.rb +6 -10
- data/lib/simple_job/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70636c7719404047f830b96fcb0848824e056b87
|
4
|
+
data.tar.gz: d65406fd2d93662f205309bb6b904823f0e32292
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6fb540bf6fd2c3989f0b06d7fbdecd8ae6bbbdbd0f942c0a6408da2a6b7ddd80109f423e80a423d978638170975a44f6f9a8e56866651d4ea3f6e2a07c96d75b
|
7
|
+
data.tar.gz: c60e8310f13008c51a31ea44469d30911622959c25e80ad3ce5096a996894993ba496fb92d4c598d6dfbe8d26099f86082a43b7f4fc604f5c7e0949d280de588
|
data/CHANGELOG.rdoc
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'socket'
|
2
2
|
|
3
3
|
require 'aws-sdk-v1'
|
4
|
-
require 'fog'
|
5
4
|
|
6
5
|
module SimpleJob
|
7
6
|
|
@@ -74,7 +73,7 @@ class SQSJobQueue < JobQueue
|
|
74
73
|
self.queues[type] = queue
|
75
74
|
|
76
75
|
@default_queue = queue if make_default
|
77
|
-
|
76
|
+
|
78
77
|
queue
|
79
78
|
end
|
80
79
|
|
@@ -183,7 +182,7 @@ class SQSJobQueue < JobQueue
|
|
183
182
|
raise('no definition found') if !definition_class
|
184
183
|
|
185
184
|
if definition_class.max_attempt_count && (message.receive_count > definition_class.max_attempt_count)
|
186
|
-
raise('max attempt count reached')
|
185
|
+
raise('max attempt count reached')
|
187
186
|
end
|
188
187
|
|
189
188
|
definition = definition_class.new.from_json(message_body)
|
@@ -262,10 +261,7 @@ class SQSJobQueue < JobQueue
|
|
262
261
|
self.sqs_queue = sqs.queues.create(queue_name)
|
263
262
|
self.visibility_timeout = visibility_timeout
|
264
263
|
self.asynchronous_execute = asynchronous_execute
|
265
|
-
self.cloud_watch =
|
266
|
-
:aws_access_key_id => AWS.config.access_key_id,
|
267
|
-
:aws_secret_access_key => AWS.config.secret_access_key
|
268
|
-
)
|
264
|
+
self.cloud_watch = AWS::CloudWatch.new
|
269
265
|
self.accept_nested_definition = accept_nested_definition
|
270
266
|
end
|
271
267
|
|
@@ -284,7 +280,7 @@ class SQSJobQueue < JobQueue
|
|
284
280
|
hostname = Socket.gethostbyname(Socket.gethostname).first
|
285
281
|
|
286
282
|
message_dimensions = [
|
287
|
-
{ 'Name' => 'Environment', 'Value' => environment },
|
283
|
+
{ 'Name' => 'Environment', 'Value' => environment },
|
288
284
|
{ 'Name' => 'SQSQueueName', 'Value' => queue_name },
|
289
285
|
{ 'Name' => 'Host', 'Value' => hostname },
|
290
286
|
]
|
@@ -316,7 +312,7 @@ class SQSJobQueue < JobQueue
|
|
316
312
|
'Dimensions' => message_dimensions
|
317
313
|
}
|
318
314
|
]
|
319
|
-
|
315
|
+
|
320
316
|
if message
|
321
317
|
now = get_milliseconds
|
322
318
|
|
@@ -371,7 +367,7 @@ class SQSJobQueue < JobQueue
|
|
371
367
|
end
|
372
368
|
end
|
373
369
|
|
374
|
-
cloud_watch.put_metric_data(self.class.config[:cloud_watch_namespace], metric_data)
|
370
|
+
cloud_watch.put_metric_data(namespace: self.class.config[:cloud_watch_namespace], metric_data: metric_data)
|
375
371
|
end
|
376
372
|
end
|
377
373
|
|
data/lib/simple_job/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Dawson
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.2'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: fog
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '1.1'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '1.1'
|
69
55
|
description: Contains libraries that support defining, queueing, and executing jobs.
|
70
56
|
email: daws23@gmail.com
|
71
57
|
executables: []
|