ci-queue 0.45.0 → 0.47.0

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: 539eadbd8b17fe11ab9904ec15717ac4e5c0f5259afe755c41ab6717ca695d31
4
- data.tar.gz: 7cbb23ab1c89433ac9087b69fbfd908594779051d13658a3cd60222dc9621286
3
+ metadata.gz: 44d3c9d768457c849133f6886a33d756823e5d59393f045ffd22222538745e09
4
+ data.tar.gz: 416acb36f1b32c8cbb170e71346522d735bf9375c7032f7337ef4fb5901b9e85
5
5
  SHA512:
6
- metadata.gz: 4e42b44a3c0bb756f941bd7b4204719ad539db163c43c59dff470a78c334e7e166e71966db5ba553fd131b329b92c2febdbc705c5579872201d0fcd1d20248f6
7
- data.tar.gz: 2e827a12d0ec96ca85bdff6f829a805b4eeb5fe4af26fd549b28f56f69649d3de6e17f7fbc60185d01b5c1ed62a77e7aea19f1a80efc50569e64899aaaa3cb2b
6
+ metadata.gz: 41d246408b2a2cbc619978a37e67de356169ce048216359cf063b1f623b03a8073be4cf117cbedc6c19719d2ff13db94e07ad6cdc804fba104fea9ee5c236614
7
+ data.tar.gz: bbe69b32ccc8253323ed181852fdea8c4a22cf6b69e0136bfafc0722421efa94ecf171ca669e6a454c7d0adc80d55f7b59ced7585e763047122ca0d01131f4c4
@@ -63,7 +63,7 @@ module CI
63
63
  end
64
64
 
65
65
  def expired?
66
- (@created_at.to_f TEN_MINUTES) < CI::Queue.time_now.to_f
66
+ (@created_at.to_f + TEN_MINUTES) < CI::Queue.time_now.to_f
67
67
  end
68
68
 
69
69
  def populated?
@@ -83,13 +83,14 @@ module CI
83
83
  end
84
84
 
85
85
  def running
86
- 1
86
+ @reserved_test ? 1 : 0
87
87
  end
88
88
 
89
89
  def poll
90
- while !@shutdown && config.circuit_breakers.none?(&:open?) && !max_test_failed? && test = @queue.shift
91
- yield index.fetch(test)
90
+ while !@shutdown && config.circuit_breakers.none?(&:open?) && !max_test_failed? && @reserved_test = @queue.shift
91
+ yield index.fetch(@reserved_test)
92
92
  end
93
+ @reserved_test = nil
93
94
  end
94
95
 
95
96
  def exhausted?
@@ -2,7 +2,7 @@
2
2
 
3
3
  module CI
4
4
  module Queue
5
- VERSION = '0.45.0'
5
+ VERSION = '0.47.0'
6
6
  DEV_SCRIPTS_ROOT = ::File.expand_path('../../../../../redis', __FILE__)
7
7
  RELEASE_SCRIPTS_ROOT = ::File.expand_path('../redis', __FILE__)
8
8
  end
@@ -157,7 +157,7 @@ module Minitest
157
157
  end
158
158
 
159
159
  def id
160
- @id ||= "#{@runnable}##{@method_name}"
160
+ @id ||= "#{@runnable}##{@method_name}".freeze
161
161
  end
162
162
 
163
163
  def <=>(other)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ci-queue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.45.0
4
+ version: 0.47.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jean Boussier
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-06 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
241
241
  - !ruby/object:Gem::Version
242
242
  version: '0'
243
243
  requirements: []
244
- rubygems_version: 3.5.5
244
+ rubygems_version: 3.5.6
245
245
  signing_key:
246
246
  specification_version: 4
247
247
  summary: Distribute tests over many workers using a queue