unicorn-worker-killer 0.3.5 → 0.3.6

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: a62e19d2cacf4fa0c1156246c9b045b7c9a9910d
4
- data.tar.gz: 4c15e610631cac77d7e96221f071f2fb441efcb1
3
+ metadata.gz: 472f5a54002c4f7d424ef88e613bce3b8d0b6a12
4
+ data.tar.gz: 50cf272d41b6cd9bbbd9d3e2218fe189c2aac5d6
5
5
  SHA512:
6
- metadata.gz: 2d9b47622f9b2f57e5b392b706dd3f2ef9e216bee03a5a5b908c0fc99fcff2963980568cbb36f94ad7d49f7006c5f971dd38fb481b76b8a10eb109c5c3041740
7
- data.tar.gz: 1822892d9f269ee1f9c524b1326f972876c5f44e1e6f646189020dcf8ab7ee9406fa02c933dad1930f21e0eb3b175854d9372b633bb2e469bda00b7d7b1cc6f3
6
+ metadata.gz: 7a5a124e1b518ebb417abc8a14f6a93202a816973a6b69073b050072193c082d071a6f6ca418b04b15b211f80327e643cccf3534452a33286df916a2aa6050bd
7
+ data.tar.gz: 65bb35218c266c2264d90d71c641ea872eba204a6420b98173256f67454cb301ad9170099e54e4c340c66adc2e53f54fa74d98f2bc77f334339ffb57cc59fafa
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ Release 0.3.6 - 2013/03/09
2
+ * do not require configuration
3
+ * fix missing randomize() in MaxRequests killer
4
+
1
5
  Release 0.3.5 - 2013/03/08
2
6
  * configurable max QUIT, TERM, and sleep interval
3
7
  * fix warning message of signal handling
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 0.3.6
@@ -1,6 +1,10 @@
1
1
  require 'unicorn/configuration'
2
2
 
3
3
  module Unicorn::WorkerKiller
4
+ class << self
5
+ attr_accessor :configuration
6
+ end
7
+
4
8
  # Self-destruction by sending the signals to myself. The process sometimes
5
9
  # doesn't terminate by SIGQUIT, so this tries to send SIGTERM and SIGKILL
6
10
  # if it doesn't finish immediately.
@@ -41,11 +45,11 @@ module Unicorn::WorkerKiller
41
45
  end
42
46
  app # pretend to be Rack middleware since it was in the past
43
47
  end
44
-
48
+
45
49
  def randomize(integer)
46
50
  RUBY_VERSION > "1.9" ? Random.rand(integer) : rand(integer)
47
51
  end
48
-
52
+
49
53
  def process_client(client)
50
54
  super(client) # Unicorn::HttpServer#process_client
51
55
  return if @_worker_memory_limit_min == 0 && @_worker_memory_limit_max == 0
@@ -64,6 +68,7 @@ module Unicorn::WorkerKiller
64
68
  end
65
69
 
66
70
  private
71
+
67
72
  def _worker_rss
68
73
  proc_status = "/proc/#{Process.pid}/status"
69
74
  if File.exists? proc_status
@@ -110,6 +115,10 @@ module Unicorn::WorkerKiller
110
115
  app # pretend to be Rack middleware since it was in the past
111
116
  end
112
117
 
118
+ def randomize(integer)
119
+ RUBY_VERSION > "1.9" ? Random.rand(integer) : rand(integer)
120
+ end
121
+
113
122
  def process_client(client)
114
123
  super(client) # Unicorn::HttpServer#process_client
115
124
  return if @_worker_max_requests_min == 0 && @_worker_max_requests_max == 0
@@ -129,7 +138,5 @@ module Unicorn::WorkerKiller
129
138
  yield(configuration) if block_given?
130
139
  end
131
140
 
132
- class << self
133
- attr_accessor :configuration
134
- end
141
+ self.configure
135
142
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicorn-worker-killer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuki Ohta
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-08 00:00:00.000000000 Z
12
+ date: 2013-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: unicorn