我使用God gem 来监控我的delayed_job 进程,到目前为止gem 正在完成它应该做的工作,但由于某种原因,我无法让他发送电子邮件通知(我使用谷歌应用程序)。这是我的上帝文件配置:
God::Contacts::Email.defaults do |d|
d.from_email = 'system@example.com'
d.from_name = 'Process monitoring'
d.delivery_method = :smtp
d.server_host = 'smtp.gmail.com'
d.server_port = 587
d.server_auth = true
d.server_domain = 'example.com'
d.server_user = 'system@example.com'
d.server_password = 'myPassword'
end
God.contact(:email) do |c|
c.name = 'me'
c.group = 'developers'
c.to_email = 'me@example.com'
end
w.start_if do |start|
start.condition(:process_running) do |c|
c.interval = 20.seconds
c.running = false
c.notify = {:contacts => ['me'], :priority => 1, :category => 'staging'}
end
有什么想法吗?