jruby-rack-worker 0.11.0 → 0.12.0
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 +4 -4
- data/LICENSE +1 -1
- data/README.md +7 -5
- data/lib/jruby-rack-worker_0.12.0.jar +0 -0
- data/lib/jruby/rack/worker/env.rb +5 -5
- data/lib/jruby/rack/worker/logger.rb +9 -5
- data/lib/jruby/rack/worker/version.rb +1 -1
- metadata +4 -4
- data/lib/jruby-rack-worker_0.11.0.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d68189614556a51a2004f8c3822a1369ee81eaa4
|
4
|
+
data.tar.gz: 919e824a590ffc91f0ee34ec09d54258816195fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c00a7b6041f79eefc14850ff249705e3683ef66db6b86707c9383ae9f8b89060a433fa9fceb239f27f7f2d242c8a07abecb6c4c460cb681ef2de01753db982d0
|
7
|
+
data.tar.gz: ae5f231a16bb4f931c2baaa16416c09318eedb2f0e3a804337ad8017cdeec3cbcb68aaa70ea3cbf4f792aadfb98f235252cf206af1a600fcb2c0910cca2ac8c8
|
data/LICENSE
CHANGED
@@ -186,7 +186,7 @@
|
|
186
186
|
same "printed page" as the copyright notice for easier
|
187
187
|
identification within third-party archives.
|
188
188
|
|
189
|
-
Copyright (c) 2010-
|
189
|
+
Copyright (c) 2010-2016 Karol Bucek
|
190
190
|
|
191
191
|
Licensed under the Apache License, Version 2.0 (the "License");
|
192
192
|
you may not use this file except in compliance with the License.
|
data/README.md
CHANGED
@@ -104,6 +104,9 @@ default a single worker thread is started with the default NORM priority) :
|
|
104
104
|
and you do care about requests more than about executing worker code you might
|
105
105
|
consider decreasing the priority (by 1).
|
106
106
|
|
107
|
+
One can also skip worker startup (no workers will boot despite the configuration)
|
108
|
+
using a parameter e.g. as a Java system property: *-Djruby.worker.skip=true*.
|
109
|
+
|
107
110
|
### Warbler
|
108
111
|
|
109
112
|
If you're using [Warbler](http://github.com/jruby/warbler) to assemble your
|
@@ -197,10 +200,9 @@ end
|
|
197
200
|
|
198
201
|
If you're deploying a Rails application on JRuby it's highly **recommended** to
|
199
202
|
uncomment `config.threadsafe!`. Otherwise, if unsure or you're code is not
|
200
|
-
thread-safe yet you'll end up polling several JRuby runtimes in a single process,
|
201
|
-
in this case however each worker thread will use
|
202
|
-
|
203
|
-
`jruby.max.runtimes` parameters).
|
203
|
+
thread-safe (yet), you'll end up polling several JRuby runtimes in a single process,
|
204
|
+
in this case however each worker thread will use and block an application runtime
|
205
|
+
from the pool (consider it while setting `jruby.min.runtimes` and `jruby.max.runtimes`).
|
204
206
|
|
205
207
|
### Trinidad
|
206
208
|
|
@@ -281,7 +283,7 @@ Build the gem (includes the .jar packaged) :
|
|
281
283
|
|
282
284
|
## Copyright
|
283
285
|
|
284
|
-
Copyright (c)
|
286
|
+
Copyright (c) 2016 [Karol Bucek](https://github.com/kares).
|
285
287
|
See LICENSE (http://www.apache.org/licenses/LICENSE-2.0) for details.
|
286
288
|
|
287
289
|
[0]: https://secure.travis-ci.org/kares/jruby-rack-worker.png
|
Binary file
|
@@ -1,7 +1,9 @@
|
|
1
1
|
module JRuby
|
2
2
|
module Rack
|
3
3
|
module Worker
|
4
|
-
|
4
|
+
|
5
|
+
def self.manager; $worker_manager; end
|
6
|
+
|
5
7
|
ENV = Hash.new do |hash, key|
|
6
8
|
if hash.key? key = key.to_s
|
7
9
|
hash[key]
|
@@ -12,9 +14,7 @@ module JRuby
|
|
12
14
|
hash[key] = val
|
13
15
|
end
|
14
16
|
end
|
15
|
-
|
16
|
-
def self.manager; $worker_manager; end
|
17
|
-
|
17
|
+
|
18
18
|
end
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
@@ -5,16 +5,20 @@ module JRuby
|
|
5
5
|
def self.log_error(e, logger = nil)
|
6
6
|
return unless ( logger ||= self.logger )
|
7
7
|
|
8
|
-
message =
|
9
|
-
|
10
|
-
|
8
|
+
message = "#{e.message} (#{e.class})"
|
9
|
+
if backtrace = e.backtrace
|
10
|
+
message << ":\n #{backtrace.join("\n ")}"
|
11
|
+
end
|
12
|
+
logger.error(message)
|
11
13
|
end
|
12
14
|
|
13
15
|
@@logger = nil
|
14
16
|
def self.logger
|
15
17
|
@@logger ||= begin
|
16
|
-
if defined?
|
18
|
+
if defined? Rails.logger # NOTE: move out
|
17
19
|
Rails.logger
|
20
|
+
elsif defined? JRuby::Rack.logger
|
21
|
+
JRuby::Rack.logger
|
18
22
|
else
|
19
23
|
default_logger
|
20
24
|
end
|
@@ -30,7 +34,7 @@ module JRuby
|
|
30
34
|
end
|
31
35
|
end
|
32
36
|
|
33
|
-
def self.logger?;
|
37
|
+
def self.logger?; @@logger end
|
34
38
|
|
35
39
|
protected
|
36
40
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-rack-worker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karol Bucek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -33,7 +33,7 @@ extra_rdoc_files: []
|
|
33
33
|
files:
|
34
34
|
- LICENSE
|
35
35
|
- README.md
|
36
|
-
- lib/jruby-rack-worker_0.
|
36
|
+
- lib/jruby-rack-worker_0.12.0.jar
|
37
37
|
- lib/jruby/rack/worker.rb
|
38
38
|
- lib/jruby/rack/worker/env.rb
|
39
39
|
- lib/jruby/rack/worker/logger.rb
|
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
59
|
version: '0'
|
60
60
|
requirements: []
|
61
61
|
rubyforge_project: "[none]"
|
62
|
-
rubygems_version: 2.4
|
62
|
+
rubygems_version: 2.6.4
|
63
63
|
signing_key:
|
64
64
|
specification_version: 4
|
65
65
|
summary: Threaded Workers with JRuby-Rack
|
Binary file
|