ksconnect 0.2.7 → 0.2.8

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
  SHA1:
3
- metadata.gz: 0e73fc8b81285c9b42353b90f2bf7112513a4297
4
- data.tar.gz: 0ca63750f36d6c17554c4fe3d5a4b3351ced40de
3
+ metadata.gz: ea648d37bdf08e22c193648dc2ef8e06c396069a
4
+ data.tar.gz: 663bc01a5c9a1e26c6255f2e90556721153a56ff
5
5
  SHA512:
6
- metadata.gz: 2b33207d8014f3f85bf9734eeed62f82752d3ad30c695655ee19fab1e50dc6f8a0559e3e649d5c08122d4e6275c1a20c4aa4071b4ba7d987666caf736ec952fd
7
- data.tar.gz: cb77c2bf2f59d06e9398794902750aeac88088581f9c7244ac57c186e64254b31141db1fd2770045238848d28f5b6d8db35f7b60258d957295385d698fa212fd
6
+ metadata.gz: e8d1aef99fafb2166cda2b51271237abe3fae887074b8dec65ba9d6fb63951fe8169025b02fcf7ebd51ddb474182ac01d610eeb75334e7deffa2a3da8b669d30
7
+ data.tar.gz: 9fd0ed41cab42654b170f31d8b4b100d7be9bbb45be598ccd2b38c797fa20e1287329ab71ff090052a1d616e47b7ddb02b1c86971904d452fc25c52bf15d05ef
@@ -101,11 +101,9 @@ class KSConnect
101
101
  id = redis.hget("#{@plugin_name}:#{@type}", @domain_name)
102
102
  if id
103
103
  @cache_uuid = id
104
- elsif !@read_only
105
- @cache_uuid = SecureRandom.uuid
106
- raise "Race on setting data key failed." unless redis.hsetnx("#{@plugin_name}:#{@type}", @domain_name, @cache_uuid)
107
104
  else
108
- '_NO_DATA_KEY'
105
+ @cache_uuid = SecureRandom.uuid
106
+ raise "Race on setting data key failed." unless !@read_only && redis.hsetnx("#{@plugin_name}:#{@type}", @domain_name, @cache_uuid)
109
107
  end
110
108
  rescue Exception => e
111
109
  if (tries -= 1).nonzero?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ksconnect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Poon