repo.or.cz
/
unicorn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
treewide: future-proof frozen_string_literal changes
[unicorn.git]
/
t
/
oob_gc.ru
blob
2ae58a82e8cbaa5fa5f9f0c42a96499905810b2e
1
#\-E none
2
# frozen_string_literal: false
3
require 'unicorn/oob_gc'
4
use Rack::ContentLength
5
use Rack::ContentType, "text/plain"
6
use Unicorn::OobGC
7
$gc_started = false
8
9
# Mock GC.start
10
def GC.start
11
$gc_started = true
12
end
13
run lambda { |env|
14
if "/gc_reset" == env["PATH_INFO"] && "POST" == env["REQUEST_METHOD"]
15
$gc_started = false
16
end
17
[ 200, {}, [ "#$gc_started\n" ] ]
18
}