Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F324226
unicorn.conf.rb
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Nov 24, 4:54 PM
Size
578 B
Mime Type
text/plain
Expires
Tue, Nov 26, 4:54 PM (1 d, 2 h)
Engine
blob
Format
Raw Data
Handle
155859
Attached To
rARCHIVING archiving
unicorn.conf.rb
View Options
listen
ENV
[
'UNICORN_LISTEN'
]
working_directory
ENV
[
'APP_ROOT'
]
worker_processes
ENV
[
'UNICORN_WORKERS'
].
to_i
pid
ENV
[
'UNICORN_PIDFILE'
]
preload_app
true
before_fork
do
|
server
,
worker
|
ActiveRecord
::
Base
.
connection
.
disconnect!
old_pid
=
"
#{
server
.
config
[
:pid
]
}
.oldbin"
if
old_pid
!=
server
.
pid
begin
sig
=
(
worker
.
nr
+
1
)
>=
server
.
worker_processes
?
:QUIT
:
:TTOU
Process
.
kill
(
sig
,
File
.
read
(
old_pid
)
.
to_i
)
rescue
Errno
::
ENOENT
,
Errno
::
ESRCH
end
end
sleep
1
end
after_fork
do
|
server
,
worker
|
ActiveRecord
::
Base
.
establish_connection
end
Event Timeline
Log In to Comment