rails_autoscale_agent 0.8.2 → 0.8.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8dbbc3694c07403043f08525c27933723f1110e7b6a035bf0ffcd47f5ba6cb8
4
- data.tar.gz: fbad110d671bfb32dcfdfb31263b1a0bfd137e2074ed6cd23b2ffd734a2b9402
3
+ metadata.gz: 3924fc840320be8327c183e1cb54055d8516d2fefee1cffbfa7092da39b05985
4
+ data.tar.gz: abd81e6c4c2dc3a65be7c426dda8742ec92b7c29c47a71eeb2566731436ce4e6
5
5
  SHA512:
6
- metadata.gz: 6c57fc917a84ebca827f1c8bebe43425f04bd70d19448f041151b40e9c9efb882cfbe3e1568c142d12fc335de348a29edfc4c859198fa7de773e302cad56916f
7
- data.tar.gz: 3f1ee0279f3513cf3048658668e4950240029b2f48a3d12d34573fa5990783ebe3f0f958e76cfa0e260d3761c54ffe2d6fdb6562e8ee3011b6b009222723c17b
6
+ metadata.gz: 4867868c9e9e707d9e4afe46f20d19f600a87b26aabf5a96f4ad8ff91698d00b08f8a0566ef20fe8f3f1c036c9220b1034a92c70280a4cf29a6d5b5a728b4105
7
+ data.tar.gz: e2fbbc4afa90c0c636dddb3172d1164108e984f4c550739df552cd185a8a51d7255ff354debc658ecfa893fb4f87f53e6c298bfe4dddf2aa35615f7636e64420
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAutoscaleAgent
4
- VERSION = "0.8.2"
4
+ VERSION = "0.8.3"
5
5
  end
@@ -27,7 +27,8 @@ module WorkerAdapters
27
27
  log_msg = String.new('DelayedJob latency ')
28
28
  t = Time.now
29
29
 
30
- sql = 'SELECT queue, min(run_at) FROM delayed_jobs GROUP BY queue'
30
+ # Ignore failed jobs (they skew latency measurement due to the original run_at)
31
+ sql = 'SELECT queue, min(run_at) FROM delayed_jobs WHERE attempts = 0 GROUP BY queue'
31
32
  run_at_by_queue = Hash[ActiveRecord::Base.connection.select_rows(sql)]
32
33
  queues = self.class.queues | run_at_by_queue.keys
33
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_autoscale_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam McCrea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-22 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler