adept_scale_active_job 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4e3a36d958c31232ac69c135b4501541914b997
4
- data.tar.gz: cf5a7f10fe02baef20f99764331923f500e4574c
3
+ metadata.gz: 10f65b5d73f494efb8e847cae2ccb3841d597b4b
4
+ data.tar.gz: 477ddccfb8c27c1054d94c748c489c000b52eaf1
5
5
  SHA512:
6
- metadata.gz: 126c6a0f26c6206a40a276ee0cebddb82d10f824e5f6cfd26c15ff1c56726aaf1fe4ed41286ef92ceac34a152d60e20eb118515a9e4ac376158e83b9c21a671f
7
- data.tar.gz: c1f5aea8cf560365c0a95a51b05d1006b0ff39ba3eb1ea96ed78005754d1de31eff8acc8f47b1f0a771a92fff0b7a2565621dc0a68b62c787fed9db358158c91
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
- adept_scale_logger.add(6, "ADEPT_SCALE JOB_FAILED")
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, :scheduled_at, :total_queue, :running_jobs]
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
@@ -1,3 +1,3 @@
1
1
  module AdeptScaleActiveJob
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-08 00:00:00.000000000 Z
11
+ date: 2018-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails