redis_queued_locks 0.0.15 → 0.0.16

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: 3270e2a14a4eed87379d84fe0622f4a231a681fb1e48325a1d6e22becafb5a60
4
- data.tar.gz: b67274aeec060e1bef07d64933928c5be3632cc68f88f12cbe01b9105ae41478
3
+ metadata.gz: 524740cce42224df4610bce35ced68e38f0fceb13ba233fe9c2f4ceac76fa49a
4
+ data.tar.gz: f3cb8b791292ba1c98b9b97c2a23b413edf74a3a5a25cebba5c7e3900f5705fd
5
5
  SHA512:
6
- metadata.gz: a40531666d37dc44d738fba4e67e027520a58f029c392a46db8a2e465200d4162ad1fdd44e16b17001edab183b8f9f90621d35f6b026a9c2628abc00ab9ea5b3
7
- data.tar.gz: 40392bb5de7d615e52e4a92b5f193c7c72970d220a9963ef89346364788c2dc1d11ef5664b20d0864dd3b151aba6a1f6bb76b45cdc5c016882dd51883df25281
6
+ metadata.gz: 732ffd5fe549d093f8bc4ef6edd1db9751aa951b0cd0f75d3ba63b8facc7a5bea1d31c88527ae2ae1c3bd4bfc5e686a447ab3907d18f37c1756167d306c929aa
7
+ data.tar.gz: f6b95308ec0653068de4816ce47a45f2470000079d468a54950f4a4bfc10c2689778108a265d3be097811d0da31b16678d14aa284903066e9c889201cc412abb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.0.16] - 2024-02-29
4
+ ### Fixed
5
+ - Execution delay formula returns the value "in seconds" (should be "in milliseconds");
6
+
3
7
  ## [0.0.15] - 2024-02-28
4
8
  ### Added
5
9
  - An ability to fail fast if the required lock is already obtained;
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RedisQueuedLocks
1
+ # RedisQueuedLocks · [![Gem Version](https://badge.fury.io/rb/redis_queued_locks.svg)](https://badge.fury.io/rb/redis_queued_locks)
2
2
 
3
3
  Distributed locks with "lock acquisition queue" capabilities based on the Redis Database.
4
4
 
@@ -32,7 +32,7 @@ Each lock request is put into the request queue and processed in order of their
32
32
 
33
33
  ### Algorithm
34
34
 
35
- - soon;
35
+ - soon
36
36
 
37
37
  ---
38
38
 
@@ -88,8 +88,8 @@ clinet = RedisQueuedLocks::Client.new(redis_client) do |config|
88
88
  # (milliseconds) (default: 200)
89
89
  config.retry_delay = 200
90
90
 
91
- # (milliseconds) (default: 50)
92
- config.retry_jitter = 50
91
+ # (milliseconds) (default: 25)
92
+ config.retry_jitter = 25
93
93
 
94
94
  # (seconds) (supports nil)
95
95
  # - nil means "no timeout" and you are only limited by "retry_count" config;
@@ -467,6 +467,7 @@ Detalized event semantics and payload structure:
467
467
  whose ttl may expire before the block execution completes);
468
468
  - an ability to add custom metadata to the lock and an ability to read this data;
469
469
  - **Minor**
470
+ - GitHub Actions CI;
470
471
  - `RedisQueuedLocks::Acquier::Try.try_to_lock` - detailed successful result analization;
471
472
  - better code stylization and interesting refactorings;
472
473
 
@@ -12,7 +12,7 @@ module RedisQueuedLocks::Acquier::Delay
12
12
  # @api private
13
13
  # @since 0.1.0
14
14
  def delay_execution(retry_delay, retry_jitter)
15
- delay = (retry_delay + rand(retry_jitter)) / 1_000
15
+ delay = (retry_delay + rand(retry_jitter)).to_f / 1_000
16
16
  sleep(delay)
17
17
  end
18
18
  end
@@ -10,7 +10,7 @@ class RedisQueuedLocks::Client
10
10
  configuration do
11
11
  setting :retry_count, 3
12
12
  setting :retry_delay, 200 # NOTE: milliseconds
13
- setting :retry_jitter, 50 # NOTE: milliseconds
13
+ setting :retry_jitter, 25 # NOTE: milliseconds
14
14
  setting :try_to_lock_timeout, 10 # NOTE: seconds
15
15
  setting :default_lock_ttl, 5_000 # NOTE: milliseconds
16
16
  setting :default_queue_ttl, 15 # NOTE: seconds
@@ -5,6 +5,6 @@ module RedisQueuedLocks
5
5
  #
6
6
  # @api public
7
7
  # @since 0.0.1
8
- # @version 0.0.15
9
- VERSION = '0.0.15'
8
+ # @version 0.0.16
9
+ VERSION = '0.0.16'
10
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis_queued_locks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.15
4
+ version: 0.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rustam Ibragimov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-02-28 00:00:00.000000000 Z
11
+ date: 2024-02-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis-client