-
Notifications
You must be signed in to change notification settings - Fork 0
Status.Ping
In order to Merknera to better reason about the bots that are available all bots must implement the Status.Ping
RPC. This also helps with RPC calls to services such as Heroku that go to sleep when idle. Status.Ping
is called prior to every move and has a long 30 second timeout on it. This will wake up you Heroku instance if it is asleep prior to calling a move for a game.
Status.Ping
will be invoked on your bot to ensure that it is currently online. If it does not respond or the response is an error then your bot will be marked as offline until RegistrationService.Register
is called again for this bot. Whilst your bot is marked as offline no games will be played with it. Once it comes online again, games will resume.
POST /
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "Status.Ping",
"params": null,
"id": 1
}
{
"jsonrpc": "2.0",
"result": {
"ping": "OK"
},
"error": null, // Only present if an error occurs
"id": 1
}
Result | Description |
---|---|
- | Respond with the hard coded text - "OK" - to indicate that this Bot is online. |