mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
work around startup issue
This commit is contained in:
parent
28a0cb494a
commit
97dfe97d5b
1 changed files with 7 additions and 2 deletions
|
@ -42,8 +42,13 @@ before_fork do |server, worker|
|
|||
# get rid of rubbish so we don't share it
|
||||
GC.start
|
||||
|
||||
require 'demon/sidekiq'
|
||||
Demon::Sidekiq.start(1)
|
||||
Thread.new do
|
||||
# sleep a bit, on startup unicorn kills all its children
|
||||
# so sidestep it
|
||||
sleep 10
|
||||
require 'demon/sidekiq'
|
||||
Demon::Sidekiq.start(1)
|
||||
end
|
||||
end
|
||||
|
||||
ActiveRecord::Base.connection.disconnect!
|
||||
|
|
Loading…
Reference in a new issue