unicorn-timeout_backtracer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/unicorn/timeout_backtracer.rb +2 -2
- data/lib/unicorn/timeout_backtracer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db2a50432af411e37f604a56cbf0a98d44affd44
|
4
|
+
data.tar.gz: 462d331a8f8e804e5e922f3c051115160bf20520
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e51da5dcb21dd2c7369feefc581ebb250e768247bb3409f7987b0102ddcd56dcdd8423c6505bf3312bbbfbbf9e9e123172a787cc4125d953cd370424b138ae5
|
7
|
+
data.tar.gz: 1361a076a29af025ae6997679c22d37216fb665099c33bb3938bf403068363788e60e855902c985b035601c16a518614e58f33323891cde986a58b5a3b4e8e63
|
@@ -9,11 +9,11 @@ class Unicorn::HttpServer
|
|
9
9
|
def kill_worker(signal, wpid)
|
10
10
|
bin_dir = Gem::Installer.new('gdbruby').bin_dir
|
11
11
|
gdbruby_bin = "#{bin_dir}/gdbruby.rb"
|
12
|
-
|
12
|
+
path = ENV['UNICORN_TIMEOUT_LOG_PATH'] || "/tmp/unicorn-timeout-backtrace-#{Process.pid}.log"
|
13
|
+
if ENV['ENABLE_UNICORN_TIMEOUT_LOG'].to_i.nonzero? && FileTest.executable?(gdbruby_bin)
|
13
14
|
if signal == :KILL
|
14
15
|
begin
|
15
16
|
pid = fork do
|
16
|
-
path = "/tmp/unicorn-timeout-backtrace-#{Process.pid}.log"
|
17
17
|
log_file = File.open(path, "a")
|
18
18
|
IO.popen("#{gdbruby_bin} #{wpid}", "r+") do |io|
|
19
19
|
while line = io.gets
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn-timeout_backtracer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SpringMT
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|