work around startup issue
This commit is contained in:
parent
28a0cb494a
commit
97dfe97d5b
|
@ -42,8 +42,13 @@ before_fork do |server, worker|
|
||||||
# get rid of rubbish so we don't share it
|
# get rid of rubbish so we don't share it
|
||||||
GC.start
|
GC.start
|
||||||
|
|
||||||
require 'demon/sidekiq'
|
Thread.new do
|
||||||
Demon::Sidekiq.start(1)
|
# sleep a bit, on startup unicorn kills all its children
|
||||||
|
# so sidestep it
|
||||||
|
sleep 10
|
||||||
|
require 'demon/sidekiq'
|
||||||
|
Demon::Sidekiq.start(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
ActiveRecord::Base.connection.disconnect!
|
ActiveRecord::Base.connection.disconnect!
|
||||||
|
|
Loading…
Reference in New Issue