-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pi/referee-server #42
Conversation
@@ -169,7 +163,8 @@ impl Metrics { | |||
*guard = Some(self.games_seconds.start_timer()); | |||
} | |||
|
|||
pub fn end_game(&self) { | |||
pub fn end_game(&self, remaining_players: i64) { | |||
self.players_current.sub(remaining_players); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be set
? given that we are talking about the remaining players
self.players_current.sub(remaining_players); | |
self.players_current.set(remaining_players); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No; players current is supposed to be the current count of players; as a player joins, we increment it, and as a player disconnects we decrement it; but if a game ends, there might be remaining players that never disconnected so we subtract that amount.
In theory, of were doing one metric server per game, we could just do set(0) on startup, provided the stats aggregation will sum the amounts across each metrics server
Rather than trying to decrement by the number of players at the end of a game, we can just set it to 0, since each server is only ever running one game
playbook/doom-dev/main.tf
Outdated
variable "sidecar_image" { | ||
type = string | ||
description = "The Docker image to use for the sidecar component of the Hydra node." | ||
} | ||
|
||
variable "dedicated_image" { | ||
type = string | ||
description = "The Docker image to use for the dedicated / referee server of the hydra node." | ||
} | ||
|
||
variable "open_head_image" { | ||
type = string | ||
description = "The Docker image to use for the open head component of the Hydra node." | ||
} | ||
|
||
variable "control_plane_image" { | ||
type = string | ||
description = "The Docker image to use for the control plane component of the Hydra node." | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should only need the dedicated_image
var. The other should all match the main image that we build out of this same repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh i think this might be a merge snafu
Adds a referee server to the hydra doom deployment.
Not sure if I did this right; not sure where to configure the image itself