deprecation_collector 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/deprecation_collector/storage.rb +7 -0
- data/lib/deprecation_collector/version.rb +1 -1
- 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: 81d6dd372292acd1a8e2fcddc6ed4ca2f8f2d4ab73f9894318ba26067e96a8a0
|
4
|
+
data.tar.gz: c4884163cbc574b1ce86d4a799c51507b88e2dbaa2f1c720c1d7362e1e39e7c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d17b36f5eee269337f20ca2901db6fb12f59d4fedc6a440be878e05956b742c69da0169ada8f89cd86e9d003e8a58421b00b18a767f23ce43ab0f17071aa0c4
|
7
|
+
data.tar.gz: a9902de9301144e6ed222eb786d32f1a13c3f504598d0dcc9d7479876c8fe0df566df1d6dc22af5695027c09231e360b72fbf9230632aacc9bd83656e08918e3
|
data/CHANGELOG.md
CHANGED
@@ -109,6 +109,8 @@ class DeprecationCollector
|
|
109
109
|
|
110
110
|
def flush(force: false)
|
111
111
|
return unless force || (current_time > @last_write_time + @write_interval)
|
112
|
+
# do not disturb existing redis connection if already in pipeline, hope that will be flushed some other time
|
113
|
+
return if in_redis_pipeline?
|
112
114
|
|
113
115
|
deprecations_to_flush = nil
|
114
116
|
@deprecations_mutex.synchronize do
|
@@ -182,6 +184,11 @@ class DeprecationCollector
|
|
182
184
|
end
|
183
185
|
|
184
186
|
protected
|
187
|
+
def in_redis_pipeline?
|
188
|
+
return false if Gem::Version.new(::Redis::VERSION) >= Gem::Version.new("5.0")
|
189
|
+
|
190
|
+
redis.instance_variable_get(:@client) != redis.instance_variable_get(:@original_client)
|
191
|
+
end
|
185
192
|
|
186
193
|
def enabled_flag_key
|
187
194
|
@enabled_flag_key ||= "#{@key_prefix}:enabled" # usually deprecations:enabled
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deprecation_collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Fedoseyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: redis
|