jruby-rack-worker 0.11.0 → 0.12.0

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: 6e9e2fd7c1c0408b39388b29fc54192b5c539239
4
- data.tar.gz: 09cb5fe9adc2305cb3689f87bc3479f5d05ad7e1
3
+ metadata.gz: d68189614556a51a2004f8c3822a1369ee81eaa4
4
+ data.tar.gz: 919e824a590ffc91f0ee34ec09d54258816195fb
5
5
  SHA512:
6
- metadata.gz: 5082840f98d8953c5348858b4cdbae1b37a51881454fcb91351d98c87cec1918c34e2cda33ea380e7e8543e5d3ff58546ffae0dec0e956adb2834b904ab09861
7
- data.tar.gz: c339d777f8a16c6a9dd281e0388bc164ebbf0ddd46b9ed29a13948947bb57a9953601e7f2fa9cad46460c1b7f0ab96585af5da961059a0d4e8325fd1a56185a8
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-2014 Karol Bucek
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 (and thus block) an application
202
- runtime from the pool (consider it while setting `jruby.min.runtimes` and
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) 2014 [Karol Bucek](https://github.com/kares).
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
@@ -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 = "\n#{e.class} (#{e.message}):\n"
9
- message << ' ' << e.backtrace.join("\n ")
10
- logger.error("#{message}\n\n")
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?(Rails.logger)
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?; !!@@logger; end
37
+ def self.logger?; @@logger end
34
38
 
35
39
  protected
36
40
 
@@ -1,7 +1,7 @@
1
1
  module JRuby
2
2
  module Rack
3
3
  module Worker
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
6
6
  end
7
7
  end
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.11.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-04-29 00:00:00.000000000 Z
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.11.0.jar
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.8
62
+ rubygems_version: 2.6.4
63
63
  signing_key:
64
64
  specification_version: 4
65
65
  summary: Threaded Workers with JRuby-Rack