English 中文(简体)
Akka Akka 在Heroko与Play 2框架的游戏日程安排
原标题:Akka Scheduling in Heroku with Play 2 Framework

我无法让 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

最佳回答

The problem seems to come from your logger setting, because in your Heartbeat you print a message with the "debug" level. AFAIK, Heroku runs your Play app in "production" mode (= "play start"), ie the log level is set to "info" so the debug messages are never printed on Heroku.

问题回答

暂无回答




相关问题
Packaging precompiled binaries inside of a gem

I ve got a ruby web app that uses lilypond to generate sheet music based on user input. I d like to move the hosting to heroku (I ve recently used heroku on a few projects and really liked it, plus ...

ActiveScaffold on Heroku s read-only file system?

ActiveScaffold apparently creates public/blank.html every time the server starts, even if that file already exists (so adding it to version control doesn t help). This is causing my application to ...

git push heroku master permission denied on VISTA

(Using Vista)I m trying to clone an app from my GitHub Repository and push it into Heroku. Okay, so I ve tried to create an SSH key so many times with this: `ssh-keygen -t rsa` It seems to go ...

SSH Public key denied on "git clone" command

I am trying to clone a git repo that I forked in my GitHub Repository.It s a rails app. I want to clone it on my local git so that I can push it onto heroku. I generated a set of rsa keys and copied ...

heroku using git branch is confusing!

Ok, so I have a big github project that i m not supposed to merge my little Stacia branch into. However, it seems like Heroku only takes pushing MASTER seriously. It looks like I pushed my branch, but ...

PostgreSQL GROUP BY different from MySQL?

I ve been migrating some of my MySQL queries to PostgreSQL to use Heroku. Most of my queries work fine, but I keep having a similar recurring error when I use group by: ERROR: column "XYZ" must ...

热门标签