rage-rb 1.17.0 → 1.17.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85fae5bbf87d602fb9cbde9e8356a6bfdb9d8e92ef02380f9124047a8d90d268
4
- data.tar.gz: c6ff4ca55836d379609e07dfd9c2025de38aeccc9a29e14803551350f2348652
3
+ metadata.gz: aa6f9f4b7b4e1f422fd778585be775834fbe1e8e30c523e2cac096bab71d0046
4
+ data.tar.gz: 776090fd9779c994c95bf4ec368cb4562c544b8fc2d99043fa0c2cb5c91903af
5
5
  SHA512:
6
- metadata.gz: 8d81759ffc54e6ede4b079dfed31dda024f274586451951aff72fa02e5cbf1014f31fc5760f07f7817dbf1db78262c88adeaff393020e54cecfd7126c169e0a2
7
- data.tar.gz: fe7a3f9d392ed9343609b0c6c4c80624eb85c2df4be31690247355f11df185af2f9fe8ede04dc01583648f0e7cf75724742f2506a38c804618dbfd53c5fb1dde
6
+ metadata.gz: c5bbbfc62d7da523ae2f7e1d9b3be2acaa67072fd34fe464f23ab909324c46c707983e828c451969c46cb019f11c6ca0abc026d641b44c4df5340add13c830dd
7
+ data.tar.gz: 814cebf4625dc114d07de548981e0a593b78f2d55dd514ca9824d68296cfabd99f79e838b2580fdc07480ed906c8081585a38d6361f33bd64c3a06a070155bed
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.17.1] - 2025-08-21
4
+
5
+ ### Fixed
6
+
7
+ - Apply backpressure to every `enqueue` call (#166).
8
+
3
9
  ## [1.17.0] - 2025-08-20
4
10
 
5
11
  ### Added
@@ -164,7 +164,7 @@ require "erb"
164
164
  # > Enables the backpressure for deferred tasks. The backpressure is used to limit the number of pending tasks in the queue. It accepts a hash with the following options:
165
165
  # >
166
166
  # > - `:high_water_mark` - the maximum number of pending tasks in the queue. Defaults to `1000`.
167
- # > - `:low_water_mark` - the minimum number of pending tasks in the queue before the backpressure is released. Defaults to `800`.
167
+ # > - `:low_water_mark` - the minimum number of pending tasks in the queue before the backpressure is released. Defaults to `high_water_mark * 0.8`.
168
168
  # > - `:timeout` - the timeout for the backpressure in seconds. Defaults to `2`.
169
169
  #
170
170
  # > ```ruby
@@ -443,7 +443,7 @@ class Rage::Configuration
443
443
  return
444
444
  end
445
445
 
446
- if opts.except(:high_water_mark, :low_water_mark, :timeout).any?
446
+ if config.except(:high_water_mark, :low_water_mark, :timeout).any?
447
447
  raise ArgumentError, "unsupported backpressure options; supported keys are `:high_water_mark`, `:low_water_mark`, `:timeout`"
448
448
  end
449
449
 
@@ -61,9 +61,7 @@ class Rage::Deferred::Queue
61
61
  private
62
62
 
63
63
  def apply_backpressure
64
- if @backlog_size > @backpressure.high_water_mark && !Fiber[:rage_backpressure_applied]
65
- Fiber[:rage_backpressure_applied] = true
66
-
64
+ if @backlog_size > @backpressure.high_water_mark
67
65
  i, target_backlog_size = 0, @backpressure.low_water_mark
68
66
  while @backlog_size > target_backlog_size && i < @backpressure.timeout_iterations
69
67
  sleep @backpressure.sleep_interval
data/lib/rage/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rage
4
- VERSION = "1.17.0"
4
+ VERSION = "1.17.1"
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rage-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.17.0
4
+ version: 1.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Samoilov
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-08-20 00:00:00.000000000 Z
10
+ date: 2025-08-21 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: thor