当我运行 bin/delayed_job start
时,出现以下错误:
Job ActiveJob::QueueAdapters::DelayedJobAdapter::JobWrapper (id=30) FAILED (0 prior attempts) with ActiveRecord::StatementInvalid: PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
PG::UnableToSend: no connection to the server
最佳答案
通过将以下内容添加到 config/initializers/delayed_job.rb
解决
ActiveRecord::Base.connection.reconnect!
关于ruby-on-rails - 运行bin/delayed_job start时,postgres没有连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36902259/