redis_queued_locks 0.0.15 → 0.0.16
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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +5 -4
- data/lib/redis_queued_locks/acquier/delay.rb +1 -1
- data/lib/redis_queued_locks/client.rb +1 -1
- data/lib/redis_queued_locks/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 524740cce42224df4610bce35ced68e38f0fceb13ba233fe9c2f4ceac76fa49a
|
4
|
+
data.tar.gz: f3cb8b791292ba1c98b9b97c2a23b413edf74a3a5a25cebba5c7e3900f5705fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 732ffd5fe549d093f8bc4ef6edd1db9751aa951b0cd0f75d3ba63b8facc7a5bea1d31c88527ae2ae1c3bd4bfc5e686a447ab3907d18f37c1756167d306c929aa
|
7
|
+
data.tar.gz: f6b95308ec0653068de4816ce47a45f2470000079d468a54950f4a4bfc10c2689778108a265d3be097811d0da31b16678d14aa284903066e9c889201cc412abb
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# RedisQueuedLocks
|
1
|
+
# RedisQueuedLocks · [](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:
|
92
|
-
config.retry_jitter =
|
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,
|
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
|
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.
|
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-
|
11
|
+
date: 2024-02-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis-client
|