看起来我没有正确设置我的演员,但不知道我该怎么做。我设置了一个由 Akka 安排的演员。但是我得到的编译器错误是:not found: value MaidActor
代码:
/**
* 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")
}
}
谢谢你的帮助!