0
看起來我沒有正確設置我的演員,但不知道我該怎麼做。我成立了一個由Akka安排的演員。不過我正在編譯器錯誤是:not found: value MaidActor
Akka調度程序找不到我的演員?
代碼:
/**
* the engine maid
*/
class MaidActor extends Actor {
def receive = {
case "ChatMaid" => {
println("A hot french maid will now clean up the chat database")
}
}
}
/**
* scheduled jobs to run in the background
*/
object EngineJobs {
/**
* clean old chats to save database space
*/
def setupJobs = {
Akka.system.scheduler.schedule(0 seconds, 120 minutes, MaidActor, "ChatMaid")
}
}
感謝您的幫助!