无法在rails生产环境中启动workling_starling_client

时间:2021-09-22 23:30:17

I was using god to start and monitor my starling and workling daemons.

我正在使用上帝开始监视我的椋鸟和狩猎守护进程。

Works awesome on development machine but "workling_starling_client" refuses to start on my production machine.

在开发机器上工作真棒,但“workling_starling_client”拒绝在我的生产机器上启动。

1 个解决方案

#1


3  

I realized that by explicitly doing

通过明确的做法我意识到了

export RAILS_ENV=production

my workling-starling-client started up properly.

我的工作 - 八哥 - 客户端正常启动。

Therefore I had to declare RAILS_ENV variable before issuing god config file

因此我必须在发出上帝配置文件之前声明RAILS_ENV变量

RAILS_ENV=production god -d config/monitor_daemons.god -t

I'm also using the variable to start starling daemon in production port

我也使用变量在生产端口启动starling守护进程

STARLING_PORT = ENV['RAILS_ENV'] == 'production' ? '-p 15151' : ''

God.watch do |w|
  ...
  w.start = "starling -d -P log/starling.pid -q log/ #{STARLING_PORT}"
  ...
end

God.watch do |w|
  ...
  w.start = "script/workling_starling_client start"
  ...

end

#1


3  

I realized that by explicitly doing

通过明确的做法我意识到了

export RAILS_ENV=production

my workling-starling-client started up properly.

我的工作 - 八哥 - 客户端正常启动。

Therefore I had to declare RAILS_ENV variable before issuing god config file

因此我必须在发出上帝配置文件之前声明RAILS_ENV变量

RAILS_ENV=production god -d config/monitor_daemons.god -t

I'm also using the variable to start starling daemon in production port

我也使用变量在生产端口启动starling守护进程

STARLING_PORT = ENV['RAILS_ENV'] == 'production' ? '-p 15151' : ''

God.watch do |w|
  ...
  w.start = "starling -d -P log/starling.pid -q log/ #{STARLING_PORT}"
  ...
end

God.watch do |w|
  ...
  w.start = "script/workling_starling_client start"
  ...

end