gitlab-labkit 2.2.0 → 2.2.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 +4 -4
- data/lib/labkit/redis/script.rb +7 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aa84e74351dd4b2829e4275391f8edb5b14c71dd8662353fa9741ee4e6ca42d8
|
|
4
|
+
data.tar.gz: 8a4ce606cb5a1d7f1f26c68bfd7c00078c2daa45b48b5b93e631d169364ea5e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cb0460842e9bd0f2f5635981d15f5024b5f8adc47b9242b5bd2bf4b6dc0041b460bd0c491496c37416b71c833af007a889b29c73608d74825838f0f2f3449c5f
|
|
7
|
+
data.tar.gz: 9cdb9688e251cfc87276bc507541149e54bf332f9b67ec4e3d08cce61fcc965c4b69be704f94c1bda6e8f867a31337e0dcb1736a59aec2ea1dee1cbb08683eeb
|
data/lib/labkit/redis/script.rb
CHANGED
|
@@ -33,7 +33,13 @@ module Labkit
|
|
|
33
33
|
# @return the script's return value
|
|
34
34
|
def eval(conn, keys:, argv:)
|
|
35
35
|
conn.evalsha(@sha, keys: keys, argv: argv)
|
|
36
|
-
|
|
36
|
+
# Redis::CommandError and RedisClient::CommandError are sibling class trees
|
|
37
|
+
# with no common ancestor above StandardError -- neither inherits from the
|
|
38
|
+
# other. A NOSCRIPT response arrives as Redis::* on single-instance
|
|
39
|
+
# connections (the redis gem's translator runs) and as RedisClient::* on
|
|
40
|
+
# cluster connections when the cluster translator skips the conversion.
|
|
41
|
+
# Both shapes must reach the EVAL fallback, so we list both classes.
|
|
42
|
+
rescue ::Redis::CommandError, ::RedisClient::CommandError => e
|
|
37
43
|
raise unless e.message.start_with?("NOSCRIPT")
|
|
38
44
|
|
|
39
45
|
conn.eval(@body, keys: keys, argv: argv)
|