ksconnect 0.2.6 → 0.2.7

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: 41113edd93cfe0db4ebbb1df360a294e69cf8b73
4
- data.tar.gz: cd1f4a1b577f97459842a5470777e0364d75b11a
3
+ metadata.gz: 0e73fc8b81285c9b42353b90f2bf7112513a4297
4
+ data.tar.gz: 0ca63750f36d6c17554c4fe3d5a4b3351ced40de
5
5
  SHA512:
6
- metadata.gz: 8fd0c51624c7679b2572287997e688efb461407a4de2942cc1b956e11d1912470875652c7fcc8b365f8cbf516466eee2d0542b7e01e69d231cbdb6ad068c84d8
7
- data.tar.gz: 854c62466e0267efed06a652e516a78c921e4e30c73af0f7c57699209d7b276861d36d60de59787c8582bc43205ae96005ef0f8f7101e2a2ecb28ef1e89636c9
6
+ metadata.gz: 2b33207d8014f3f85bf9734eeed62f82752d3ad30c695655ee19fab1e50dc6f8a0559e3e649d5c08122d4e6275c1a20c4aa4071b4ba7d987666caf736ec952fd
7
+ data.tar.gz: cb77c2bf2f59d06e9398794902750aeac88088581f9c7244ac57c186e64254b31141db1fd2770045238848d28f5b6d8db35f7b60258d957295385d698fa212fd
@@ -101,20 +101,16 @@ class KSConnect
101
101
  id = redis.hget("#{@plugin_name}:#{@type}", @domain_name)
102
102
  if id
103
103
  @cache_uuid = id
104
- else
104
+ elsif !@read_only
105
105
  @cache_uuid = SecureRandom.uuid
106
106
  raise "Race on setting data key failed." unless redis.hsetnx("#{@plugin_name}:#{@type}", @domain_name, @cache_uuid)
107
+ else
108
+ '_NO_DATA_KEY'
107
109
  end
108
110
  rescue Exception => e
109
111
  if (tries -= 1).nonzero?
110
112
  logger.warn e.message
111
113
  retry
112
- else
113
- if @read_only
114
- raise e # re-raise if can't get uuid after all tries
115
- else
116
- '_NO_DATA_KEY'
117
- end
118
114
  end
119
115
  end
120
116
  }
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.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Poon