我无法让 Akka 安排方法在赫鲁库正常工作。 本地工作很好, 并将“ 心跳” 打印到日志上 。
以下是有关文件:https://github.com/magnusart/actor-test/blob/maglob/ap/Glob.scala 和下面的片段。
override def onStart(app: Application) {
Logger.debug("Starting application")
Akka.system(app).scheduler.schedule(2 seconds, 10 seconds) {
Logger.debug("Heartbeat")
}
}
The full application is here (isolated for this purpose, also on actor-test.herokuapp.com). https://github.com/magnusart/actor-test
启动后发生的情况是,我在日志中看到 < code> startting application 应用程序 < /code>, 之后我再看不到任何进一步的情况:
2012-05-26T16:29:40+00:00 heroku[web.1]: Starting process with command `target/start -Dhttp.port=43943 -Xmx384m -Xss512k -XX:+UseCompressedOops`
2012-05-26T16:29:41+00:00 app[web.1]: Play server process ID is 3
2012-05-26T16:29:42+00:00 app[web.1]: [debug] application - Starting application
2012-05-26T16:29:42+00:00 app[web.1]: [info] play - Starting application default Akka system.
2012-05-26T16:29:42+00:00 app[web.1]: [info] play - Application started (Prod)
2012-05-26T16:29:42+00:00 app[web.1]: [info] play - Listening for HTTP on port 43943...
所以计划演员实际上似乎没有开始(当然是在当地开始的 ) 。 我在Heroko Cedar上。 我很感激任何提示, 说明为什么这不起作用, 我错过了什么?
BR 马格努斯·安德森
Update From what I ve found, this seems to be a bug in Play 2 (I m running version 2.0.1) and not be related to Heroku. I have updated a Play 2 Lighthouse ticket with relevant information. The ticket can be found here: https://play.lighthouseapp.com/projects/82401-play-20/tickets/448-play-dist-ignores-loggerxml#ticket-448-5