hirefire-resource 1.0.0 → 1.0.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
  SHA256:
3
- metadata.gz: 1e973c6cacc949a2272e34b4e7d198a0eacf2b6f64c45cd68992365606eacb08
4
- data.tar.gz: fb11287cb45d6d310396dce3b847b9d188bf8cea4ebae0fb83deecc45ac4093a
3
+ metadata.gz: ee09e3d0517e42a7a4f4296819a83dd0fb388b97a397e999e5247b7b70ec59dd
4
+ data.tar.gz: 52d912c792432d369dc11a265848066ab9387c6c3436d48d1ec596b304021d86
5
5
  SHA512:
6
- metadata.gz: a30817796fceb776b6439e9c5d56c4663ff2619fdb0c5efdf88a53b0427d6fed277488bf15f2af0defb089a482702cc3daffcc11351143b091c4fe46905b21a3
7
- data.tar.gz: ee5a162079121d899877b8fdee63b8bb288b1ab7670d5e849e0652d513c463712ad3acfff5bd41249cf1198208bbecc6b22a44507a5138aa0e1c6a7504837142
6
+ metadata.gz: e75538ac052935c1285805edaba6a0bc78eef98c3faa574ac5840e02844aecda115a06c32fa1f2538921ef16fdb7d19b80b702a5789f3f129a6b0171adfc0438
7
+ data.tar.gz: 2bd30361187bae0856420c1c142f527ee82768c8d9ddaeecd5c013f00a2ae10f3587c0772ac7eaeb2960497eda7c75cdc1e9685adc396fd40c22c071e1a48866
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## v1.0.1
2
+
3
+ * Fix issue where jobs that were enqueued using `sidekiq < 7.2.1` and then processed with `sidekiq >= 7.2.1` (after updating) resulted in a `NoMethodError: undefined method 'queue' for Hash` error during checkups.
4
+
1
5
  ## v1.0.0
2
6
 
3
7
  * `HireFire`:
@@ -122,10 +122,10 @@ module HireFire
122
122
 
123
123
  if !options[:skip_working]
124
124
  in_progress = ::Sidekiq::Workers.new.count do |key, tid, job|
125
- if Gem::Version.new(::Sidekiq::VERSION) >= Gem::Version.new("7.0.0")
126
- queues.include?(job.queue) && job.run_at <= now
127
- else
125
+ if job.is_a?(Hash) # Sidekiq < 7.2.1
128
126
  queues.include?(job["queue"]) && job["run_at"] <= now_as_i
127
+ else # Sidekiq >= 7.2.1
128
+ queues.include?(job.queue) && job.run_at <= now
129
129
  end
130
130
  end
131
131
  end
@@ -223,10 +223,10 @@ module HireFire
223
223
  now_as_i = now.to_i
224
224
 
225
225
  ::Sidekiq::Workers.new.count do |key, tid, job|
226
- if Gem::Version.new(::Sidekiq::VERSION) >= Gem::Version.new("7.0.0")
227
- (queues.empty? || queues.include?(job.queue)) && job.run_at <= now
228
- else
226
+ if job.is_a?(Hash) # Sidekiq < 7.2.1
229
227
  (queues.empty? || queues.include?(job["queue"])) && job["run_at"] <= now_as_i
228
+ else # Sidekiq >= 7.2.1
229
+ (queues.empty? || queues.include?(job.queue)) && job.run_at <= now
230
230
  end
231
231
  end
232
232
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HireFire
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hirefire-resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael van Rooijen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-23 00:00:00.000000000 Z
11
+ date: 2024-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appraisal