adept_scale_active_job 0.1.0 → 0.1.1
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/adept_scale_active_job.rb +4 -3
- data/lib/adept_scale_active_job/version.rb +1 -1
- 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: 10f65b5d73f494efb8e847cae2ccb3841d597b4b
|
4
|
+
data.tar.gz: 477ddccfb8c27c1054d94c748c489c000b52eaf1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb4af8c39c8c1fd56987be0b331a59021a622b33ce153e2a994d44ae9696564fba73c54ceffc75a16f70ee9156ddcb9c8e0bfd3e962eb71f035fbc37a428575b
|
7
|
+
data.tar.gz: d37ad446a4a4dc2c21f3508065a8066a9b400d3a54ed168580248bd4114cbf07ac82ba1c85bb41da3265a4e155d2a8919d3bf9ce563b0d803ea36904fa66107a
|
@@ -10,7 +10,7 @@ module AdeptScaleActiveJob
|
|
10
10
|
after_enqueue do |job|
|
11
11
|
#NOTE: For this basic-use gem we will assume the queue_name is also the dyno type.
|
12
12
|
#TODO: either figure out how to obtain the queue_name->dyno_type mapping from config, or build an initializer for the user to set it themselves
|
13
|
-
job_params = {:dyno_type => job.queue_name, :scheduled_at => job.scheduled_at}
|
13
|
+
job_params = {:dyno_type => job.queue_name, :job_id => job.provider_job_id, :scheduled_at => job.scheduled_at}
|
14
14
|
adept_scale_logger.add(6, "ADEPT_SCALE JOB_QUEUED #{format_params job_params}")
|
15
15
|
end
|
16
16
|
|
@@ -30,7 +30,8 @@ module AdeptScaleActiveJob
|
|
30
30
|
#Catch all Object level base Exceptions, if we can, so we can remove them from the running process list
|
31
31
|
def log_exception e
|
32
32
|
#Don't log the exception to Adept, this is the clients' private business.
|
33
|
-
|
33
|
+
job_params = {:dyno_type => job.queue_name, :job_id => job.provider_job_id}
|
34
|
+
adept_scale_logger.add(6, "ADEPT_SCALE JOB_FAILED #{format_params job_params}")
|
34
35
|
#reraise so as to hopefully not interefere with other error handling
|
35
36
|
raise e
|
36
37
|
end
|
@@ -40,7 +41,7 @@ module AdeptScaleActiveJob
|
|
40
41
|
#@param Hash | a key/value hash of our params.
|
41
42
|
def format_params job_params
|
42
43
|
#Only allow these params to be stringified
|
43
|
-
params = [:dyno_type, :job_id, :scheduled_at, :
|
44
|
+
params = [:dyno_type, :job_id, :scheduled_at, :total_queue, :running_jobs]
|
44
45
|
params.reduce([]) do |ary, param|
|
45
46
|
ary << "#{param}=#{job_params[param]}" if job_params.has_key?(param)
|
46
47
|
ary
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adept_scale_active_job
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Burnett
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|