istox 0.1.150.pre.1 → 0.1.150

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: 77b70b5d7c38137999eaaa301f0a74571453cc41d009b0ecdcae688a5139c0f8
4
- data.tar.gz: 2a298b4615aecea457483f440e0c5cfaf79f95539ed0ae43b4474e07582176d8
3
+ metadata.gz: 154d28f3161694e600d2b91e6228f8ba8d2b4607d780c019a21ba7d11c7a8561
4
+ data.tar.gz: 8ca5dc975720817fd761a0a0143e6ca83bd5ccc10bd143d451f4130c90c12917
5
5
  SHA512:
6
- metadata.gz: 3920f1b7a98b42ce6af12405b6e09105d8cd208f487256ed768ab0ed8a59546fd708f90c7c37f9f2dd9a99d747d877dc8312c2e468e485fe4480bb79412781ee
7
- data.tar.gz: e1d9e36b288688133b513bd89b902fcb1b64f126125a9033482f795c91f068b975570ef6d50df8e4ac4c9eb7c10a4b01b6ed1d0d8d5690700eaafdeb1615e46b
6
+ metadata.gz: b289d0b35f574c6383e5952e26a8e8c061aa7d022ccda5a5b89d16b0d2d044a213368e65b47929d68955d88a5f7b0ee685ae4276ed3dccf514fd78a45f5a5886
7
+ data.tar.gz: af51d3216cfcf1226b577b3141628138c06037313b4a2eaed04e08acdacc9b415662e2df5679863ad0013f101493a625517fb3c53fb636a2f1f07fcec35cf6f1
data/.idea/istox-gem.iml CHANGED
@@ -7,6 +7,6 @@
7
7
  <content url="file://$MODULE_DIR$" />
8
8
  <orderEntry type="inheritedJdk" />
9
9
  <orderEntry type="sourceFolder" forTests="false" />
10
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.6, RVM: ruby-2.5.3 [global]) [gem]" level="application" />
10
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.17.3, RVM: ruby-2.5.3 [global]) [gem]" level="application" />
11
11
  </component>
12
12
  </module>
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- istox (0.1.148)
4
+ istox (0.1.150)
5
5
  awesome_print
6
6
  binding_of_caller
7
7
  bunny (>= 2.12.0)
@@ -65,7 +65,7 @@ GEM
65
65
  arel (9.0.0)
66
66
  awesome_print (1.8.0)
67
67
  aws-eventstream (1.1.0)
68
- aws-sigv4 (1.1.1)
68
+ aws-sigv4 (1.1.3)
69
69
  aws-eventstream (~> 1.0, >= 1.0.2)
70
70
  binding_of_caller (0.8.0)
71
71
  debug_inspector (>= 0.0.1)
@@ -98,18 +98,18 @@ GEM
98
98
  ffi (1.12.2)
99
99
  globalid (0.4.2)
100
100
  activesupport (>= 4.2.0)
101
- google-protobuf (3.11.4-universal-darwin)
101
+ google-protobuf (3.11.4)
102
102
  googleapis-common-protos-types (1.0.5)
103
103
  google-protobuf (~> 3.11)
104
104
  graphlient (0.3.7)
105
105
  faraday
106
106
  faraday_middleware
107
107
  graphql-client
108
- graphql (1.10.6)
108
+ graphql (1.10.8)
109
109
  graphql-client (0.16.0)
110
110
  activesupport (>= 3.0)
111
111
  graphql (~> 1.8)
112
- grpc (1.28.0-universal-darwin)
112
+ grpc (1.28.0)
113
113
  google-protobuf (~> 3.11)
114
114
  googleapis-common-protos-types (~> 1.0)
115
115
  grpc-tools (1.28.0)
data/lib/istox.rb CHANGED
@@ -33,6 +33,7 @@ module Istox
33
33
  require 'istox/helpers/regex_helper'
34
34
  require 'istox/helpers/result_handler'
35
35
  require 'istox/helpers/redis'
36
+ require 'istox/helpers/dlm'
36
37
  require 'istox/helpers/remote_model_cache'
37
38
  require 'istox/models/blockchain_receipt'
38
39
  require 'istox/models/concerns/blockchain_receipt_query'
@@ -252,7 +252,6 @@ module Istox
252
252
  end
253
253
 
254
254
  def queue_ok?(conn, name)
255
- Logger "queue_ok? #{name}"
256
255
  ch = conn.create_channel
257
256
  begin
258
257
  q = ch.queue(name, passive: true)
@@ -1,10 +1,6 @@
1
- require 'redlock'
2
-
3
1
  module Istox
4
2
  class DLMBoot
5
3
  class << self
6
- private
7
-
8
4
  def lock(key, timeout = 3600, db)
9
5
  loop do
10
6
  break if ::Istox::RedisBoot.sets(key, 1, {nx: true, px: timeout}, db)
@@ -48,7 +48,7 @@ module Istox
48
48
  end
49
49
  end
50
50
 
51
- def get(key:, field:, auto_convert_openstruct: true)
51
+ def get(key:, field:)
52
52
  raise 'You must provide a callback block if cache doesnt exist' unless block_given?
53
53
 
54
54
  key = key.to_s
@@ -60,7 +60,7 @@ module Istox
60
60
 
61
61
  if result.present?
62
62
  begin
63
- return auto_convert_openstruct ? ::Istox::CommonHelper.to_open_struct(JSON.parse(result)) : result
63
+ return ::Istox::CommonHelper.to_open_struct(JSON.parse(result))
64
64
  rescue StandardError => e
65
65
  log.warn('Unable to process result from cache store, is it not a json?')
66
66
  log.warn(e)
@@ -104,7 +104,7 @@ module Istox
104
104
  break unless ::Istox::BunnyBoot.queue_single_consumer? consumer_key
105
105
 
106
106
  flag = false
107
- ::Istox::DLMBoot.lock("peatio:#{consumer_key}:locking", 5) do
107
+ ::Istox::DLMBoot.lock("peatio:#{consumer_key}:locking", 10) do
108
108
  flag = ::Istox::BunnyBoot.queue_ok? @conn, queue.name
109
109
  end
110
110
  break if flag
data/lib/istox/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Istox
2
- VERSION = '0.1.150-1'.freeze
2
+ VERSION = '0.1.150'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: istox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.150.pre.1
4
+ version: 0.1.150
5
5
  platform: ruby
6
6
  authors:
7
7
  - Siong Leng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-11 00:00:00.000000000 Z
11
+ date: 2020-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: awesome_print
@@ -471,11 +471,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
471
471
  version: '0'
472
472
  required_rubygems_version: !ruby/object:Gem::Requirement
473
473
  requirements:
474
- - - ">"
474
+ - - ">="
475
475
  - !ruby/object:Gem::Version
476
- version: 1.3.1
476
+ version: '0'
477
477
  requirements: []
478
- rubygems_version: 3.0.3
478
+ rubygems_version: 3.0.8
479
479
  signing_key:
480
480
  specification_version: 4
481
481
  summary: istox backend shared gem