lonline 0.0.1 → 0.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7881beef7a86ecb8796452640f609951435a563
4
- data.tar.gz: 4b9078505a7baf1d203880c3d7ecacc363785b7e
3
+ metadata.gz: 6f7688b37e1bf8bc609fd233a5b8720cd55dcfb8
4
+ data.tar.gz: ae1e3c5b52ded05ac95e6a8a0fc798ea98a2d1d1
5
5
  SHA512:
6
- metadata.gz: 1eb613295148a2b31a104bb3afa4f7745a300d649be91989fa3182fac8a8f11a4963d3c0a31be17a33cb2319050dbfa7a7a87b1e5df1e57c44dd05e0f2bb956f
7
- data.tar.gz: 3c3a7d8d13dec976fce98c628552a50cf3ba9be8fca96d3d4f2f0e01958aa9f0f13206dc204134a9b5fb7dc6ba8e722d95542ab8fd51026cc59fa18231537475
6
+ metadata.gz: 43e13278052ef4a9071b187d917e2a0584ae2fcfb573e44db32ef52775e3a2ebf2284f1342cfecd0199e6d31efe8317b011706e88ec0a9276c6edcb0a3d55a14
7
+ data.tar.gz: 78ef3a6d62d331b65627b7df2c6369ce178f15879700b7ad1c1eec3b8b2de0fb429b7bde9a38e01aa4cda889f4663f2aee32ad5d3eb9eab785f4d42d2348de99
@@ -47,6 +47,7 @@
47
47
  #For further information, visit lonline's repository on https://github.com/dynamicloud/lonline_for_ruby
48
48
 
49
49
  require 'dynamic_api'
50
+ require 'threadpool'
50
51
  require 'yaml'
51
52
 
52
53
  module Lonline
@@ -62,6 +63,8 @@ module Lonline
62
63
  :trace => 1
63
64
  }
64
65
 
66
+ POOL = ThreadPool.new(3)
67
+
65
68
  # This class provides the four methods to log and send data to the cloud.
66
69
  class Log
67
70
  attr_accessor :logger
@@ -176,14 +179,7 @@ module Lonline
176
179
  if Lonline::SETUP::SETTINGS[:config]['async']
177
180
  Lonline.warn_it 'Async mode'
178
181
 
179
- t = schedule(trace)
180
-
181
- # For test environment the async mode is disabled.
182
- if Lonline::SETUP::SETTINGS[:config]['env'].eql?('test')
183
- Lonline.warn_it 'For test environment, the async process is disabled'
184
-
185
- t.join
186
- end
182
+ schedule(trace)
187
183
  else
188
184
  Lonline.warn_it 'Sync mode'
189
185
  call_dynamicloud_service(trace)
@@ -192,7 +188,7 @@ module Lonline
192
188
  end
193
189
 
194
190
  def schedule(trace)
195
- Thread.new {
191
+ POOL.process {
196
192
  call_dynamicloud_service(trace)
197
193
  }
198
194
  end
@@ -1,3 +1,3 @@
1
1
  module LONLINE
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lonline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - lonline
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: threadpool
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: "\n You will be able to execute the following operations:\n lonline.log.trace()
84
98
  -\n lonline.log.debug() -\n lonline.log.info() -\n lonline.log.warn() -\n
85
99
  \ lonline.log.error() -\n lonline.log.fatal() - Additionally, Lonline provides
@@ -115,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
129
  version: '0'
116
130
  requirements: []
117
131
  rubyforge_project:
118
- rubygems_version: 2.4.8
132
+ rubygems_version: 2.5.2
119
133
  signing_key:
120
134
  specification_version: 4
121
135
  summary: This gem allows you to log your program into the cloud.