fix ai server http api
This commit is contained in:
parent
829bffaa6e
commit
61746557aa
|
@ -43,5 +43,5 @@ final class AiEnv(settings: Settings) {
|
|||
|
||||
lazy val stupidAi = new StupidAi
|
||||
|
||||
def isServer = AiServerMode
|
||||
val isServer = AiServerMode
|
||||
}
|
||||
|
|
|
@ -20,12 +20,14 @@ object Global extends GlobalSettings {
|
|||
else core.Cron start env
|
||||
}
|
||||
|
||||
override def onRouteRequest(req: RequestHeader): Option[Handler] = {
|
||||
env.monitor.rpsProvider.countRequest()
|
||||
env.security.firewall.requestHandler(req) orElse
|
||||
env.i18n.requestHandler(req) orElse
|
||||
super.onRouteRequest(req)
|
||||
}
|
||||
override def onRouteRequest(req: RequestHeader): Option[Handler] =
|
||||
if (env.ai.isServer) super.onRouteRequest(req)
|
||||
else {
|
||||
env.monitor.rpsProvider.countRequest()
|
||||
env.security.firewall.requestHandler(req) orElse
|
||||
env.i18n.requestHandler(req) orElse
|
||||
super.onRouteRequest(req)
|
||||
}
|
||||
|
||||
override def onHandlerNotFound(req: RequestHeader): Result = {
|
||||
controllers.Lobby handleNotFound req
|
||||
|
|
|
@ -84,12 +84,12 @@ ai {
|
|||
crafty {
|
||||
exec_path = "/usr/bin/crafty"
|
||||
book_path = "/usr/share/crafty"
|
||||
remote_url = "http://localhost:9000/ai/play/crafty"
|
||||
remote_url = "http://188.165.194.171:9071/ai/play/crafty"
|
||||
}
|
||||
stockfish {
|
||||
exec_path = "/usr/bin/stockfish"
|
||||
#url = "http://188.165.194.171:9071/ai/play/stockfish"
|
||||
remote_url = "http://localhost:9000/ai/play/stockfish"
|
||||
#remote_url = "http://188.165.194.171:9071/ai/play/stockfish"
|
||||
remote_url = "http://localhost:9071/ai/play/stockfish"
|
||||
}
|
||||
}
|
||||
moretime.seconds = 15 seconds
|
||||
|
@ -122,7 +122,7 @@ logger {
|
|||
}
|
||||
|
||||
akka {
|
||||
loglevel = DEBUG
|
||||
loglevel = INFO
|
||||
stdout-loglevel = DEBUG
|
||||
log-config-on-start = off
|
||||
event-handlers = ["lila.core.AkkaLogger"]
|
||||
|
|
Loading…
Reference in a new issue