사이드 키를 시작하고 모니터하기 위해 god.rb를 실행하면 이것이 작동하지 않습니다. sidekq에 대한 내 신의 설정 아래.sidekiq 사실 god.rb는 터미널에서 동일한 명령을 내 작업자가 실행하지 않습니까?
수동으로 터미널에서 수동으로 sidekiq -C /srv/books/current/config/sidekiq.yml을 실행해도 문제가 발생하지 않지만 sidekiq god.rb config 사용자는 아무 문제가 없습니다. 로그에 아무것도 없습니다.
God.watch do |w|
w.name = "sidekiq"
w.interval = 30.seconds
w.start = "cd #{ENV['RAILS_ROOT']}; sidekiq -C /srv/books/current/config/sidekiq.yml"
w.stop = "cd #{ENV['RAILS_ROOT']}; exec sidekiqctl stop /srv/books/shared/tmp/pids/sidekiq.pid"
w.restart = "#{w.stop} && #{w.start}"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
w.log = File.join(ENV['RAILS_ROOT'], 'log', 'sidekiq.log')
# determine the state on startup
w.transition(:init, {true => :up, false => :start}) do |on|
on.condition(:process_running) do |c|
c.running = true
end
end
# determine when process has finished starting
w.transition([:start, :restart], :up) do |on|
on.condition(:process_running) do |c|
c.running = true
c.interval = 5.seconds
end
# failsafe
on.condition(:tries) do |c|
c.times = 5
c.transition = :start
c.interval = 5.seconds
end
end
# start if process is not running
w.transition(:up, :start) do |on|
on.condition(:process_running) do |c|
c.running = false
end
end
# Notifications
# --------------------------------------
w.transition(:up, :start) do |on|
on.condition(:process_exits) do |p|
p.notify = 'ect'
end
end
end
은 RAILS_ENV/RAILS_ROOT가 설정되어 있습니까? –