redis_queued_locks 1.10.0 → 1.11.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7161dbfaa5660709705978e003201b12c4684d5c271fc700710802b10586e00
|
4
|
+
data.tar.gz: efaf7103b6bddfd708aceca2d967f282e60b6a74b43c7de2314512cdc963fd19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4736b2cf3ec4fa9a121425769a5037aa78d2f5765829533fd4cb830f3e184b856d03a5fc2e7653df3a49c47975de074120f55ddc88476d78b623131ffc718f48
|
7
|
+
data.tar.gz: eb2e86d9764606a11f7c547e8e1ff6b126a26a3cbfd3ea6cff0f670625d6845a441eb7ef6ad9c0e9ce125e0f5fb983feb068205b04bb5a27b85307d5119140d9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
### [1.11.0] - 2024-08-11
|
4
|
+
### Changed
|
5
|
+
- Lock Acquierment Timeout (`acq_timeout`/`queue_ttl`): more correct timeout error interception
|
6
|
+
inside the `RedisQueuedLocks::Acquier::AcquireLock::WithAcqTimeout` logic that now raises and
|
7
|
+
intercepts an internal timeout error class in order to prevent interceptions of
|
8
|
+
other timeouts that can be raised from the wrapped block of code;
|
9
|
+
|
3
10
|
## [1.10.0] - 2024-08-11
|
4
11
|
### Changed
|
5
12
|
- Timed invocations (`"timeed blocks of code"` / `timed: true`):
|
@@ -8,6 +15,8 @@
|
|
8
15
|
now uses `Timeout#timeout`'s custom exception class/message replacement API;
|
9
16
|
- `rescue Timeout::Error` can lead to incorrect exception interception: intercept block's-related
|
10
17
|
Timeout::Error that is not RQL-related error;
|
18
|
+
- Updated development dependencies;
|
19
|
+
- Some minor readme updates;
|
11
20
|
### Added
|
12
21
|
- `RedisQueuedLocks::Swarm`: missing YARDocs;
|
13
22
|
- Separated `Logging Configuration` readme section (that is placed inside the main configuration section already);
|
@@ -21,7 +21,7 @@ module RedisQueuedLocks::Acquier::AcquireLock::WithAcqTimeout
|
|
21
21
|
#
|
22
22
|
# @api private
|
23
23
|
# @since 1.0.0
|
24
|
-
# @version 1.
|
24
|
+
# @version 1.11.0
|
25
25
|
def with_acq_timeout(
|
26
26
|
redis,
|
27
27
|
timeout,
|
@@ -32,8 +32,12 @@ module RedisQueuedLocks::Acquier::AcquireLock::WithAcqTimeout
|
|
32
32
|
on_timeout: nil,
|
33
33
|
&block
|
34
34
|
)
|
35
|
-
|
36
|
-
|
35
|
+
# TODO:
|
36
|
+
# think about the runtime error class-object creation that perevent any timeout error
|
37
|
+
# interception collisions (but remember: it can lead to regular internal ruby method/constant
|
38
|
+
# cache invalidation);
|
39
|
+
::Timeout.timeout(timeout, RedisQueuedLocks::LockAcquiermentIntermediateTimeoutError, &block)
|
40
|
+
rescue RedisQueuedLocks::LockAcquiermentIntermediateTimeoutError
|
37
41
|
on_timeout.call unless on_timeout == nil
|
38
42
|
|
39
43
|
if raise_errors
|
@@ -13,6 +13,10 @@ module RedisQueuedLocks
|
|
13
13
|
# @since 1.0.0
|
14
14
|
LockAlreadyObtainedError = Class.new(Error)
|
15
15
|
|
16
|
+
# @api private
|
17
|
+
# @since 1.11.0
|
18
|
+
LockAcquiermentIntermediateTimeoutError = Class.new(::Timeout::Error)
|
19
|
+
|
16
20
|
# @api public
|
17
21
|
# @since 1.0.0
|
18
22
|
LockAcquiermentTimeoutError = Class.new(Error)
|
data/lib/redis_queued_locks.rb
CHANGED