lonline 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lonline.rb +5 -9
- data/lib/lonline/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f7688b37e1bf8bc609fd233a5b8720cd55dcfb8
|
4
|
+
data.tar.gz: ae1e3c5b52ded05ac95e6a8a0fc798ea98a2d1d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43e13278052ef4a9071b187d917e2a0584ae2fcfb573e44db32ef52775e3a2ebf2284f1342cfecd0199e6d31efe8317b011706e88ec0a9276c6edcb0a3d55a14
|
7
|
+
data.tar.gz: 78ef3a6d62d331b65627b7df2c6369ce178f15879700b7ad1c1eec3b8b2de0fb429b7bde9a38e01aa4cda889f4663f2aee32ad5d3eb9eab785f4d42d2348de99
|
data/lib/lonline.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
191
|
+
POOL.process {
|
196
192
|
call_dynamicloud_service(trace)
|
197
193
|
}
|
198
194
|
end
|
data/lib/lonline/version.rb
CHANGED
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.
|
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.
|
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.
|