Game maintenance and recovery
Sometimes you need to take down your game temporarily. This might be for routine game maintenance, or because something’s gone wrong.
Set up a worker flag callback
You can use a worker flag and the callback
OnFlagUpdate to let players know that the game is going to stop. Which worker you set up the callback on depends on how you want to communicate the information to the players. For example, if you want to display a message to all players on their game clients, you’d set up the callback on your game client worker.
Set up your worker to register the
OnFlagUpdate callback for a worker flag with a specific name (for example,
urgent_restart) and to handle the flag’s value (for example, a message). You shouldn’t add the worker flag itself until you need to let the players know that the game is going to stop.