现有的“上帝”将无法正确加载和监控

时间:2017-05-08 23:19:18

标签: ruby god

非常简单的问题。这是设计还是错误?

首先,我有一个非常简单的ruby脚本等待5秒,然后抛出异常。

#t.rb#
sleep 5
raise 'ex'

的神配置文件
 #numanagedev.conf#
 God.watch do |w|
    w.name = "Numanage"
         w.start = "ruby t.rb"#"/Users/jonathan/.rvm/bin/god_puma -p 3000"
         w.keepalive
         w.dir ="/Users/jonathan/projects/numanage"
 end

当我运行god -c numanagedev.conf,并观察日志并且它完美无缺。

 jonathan@Jonathans-MacBook-Pro-2 ~> god log Numanage
 Please wait...
 I [2017-05-08 18:10:09]  INFO: Numanage [trigger] process 6563 exited (ProcessExits)
 I [2017-05-08 18:10:09]  INFO: Numanage move 'up' to 'start'
 I [2017-05-08 18:10:09]  INFO: Numanage deregistered 'proc_exit' event for pid 6563
 I [2017-05-08 18:10:09]  INFO: Numanage start: ruby t.rb
 I [2017-05-08 18:10:09]  INFO: Numanage moved 'up' to 'start'
 I [2017-05-08 18:10:09]  INFO: Numanage [trigger] process is running (ProcessRunning)
 I [2017-05-08 18:10:09]  INFO: Numanage move 'start' to 'up'
 I [2017-05-08 18:10:09]  INFO: Numanage registered 'proc_exit' event for pid 6573
 I [2017-05-08 18:10:09]  INFO: Numanage moved 'start' to 'up'

但是,当我启动god进程,然后加载god load numanagedev.conf时,日志中不会显示任何内容。它应该停止并重新开始。但god status表示正在运行

0 个答案:

没有答案