Skip to content
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

fix: mm fixes #731

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions svc/pkg/mm/worker/redis-scripts/nomad_node_closed_set.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ for i=1,lobby_count do
local max_players_normal = tonumber(ARGV[real_i * 3 + 3])
local max_players_party = tonumber(ARGV[real_i * 3 + 4])

local key_lobby_config = KEYS[real_i * 4 + 2]
local key_lobby_config = KEYS[real_i * 4 + 1]

local is_closed = redis.call('HGET', key_lobby_config, 'c')

-- Don't modify closed lobbies
if is_closed ~= '1' then
local key_lobby_player_ids = KEYS[real_i * 4 + 3]
local key_lobby_available_spots_normal = KEYS[real_i * 4 + 4]
local key_lobby_available_spots_party = KEYS[real_i * 4 + 5]
local key_lobby_player_ids = KEYS[real_i * 4 + 2]
local key_lobby_available_spots_normal = KEYS[real_i * 4 + 3]
local key_lobby_available_spots_party = KEYS[real_i * 4 + 4]

local player_count = redis.call('ZCARD', key_lobby_player_ids)
redis.call('ZADD', key_lobby_available_spots_normal, max_players_normal - player_count, lobby_id)
Expand Down
4 changes: 2 additions & 2 deletions svc/pkg/mm/worker/src/workers/lobby_create/nomad_job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ pub fn gen_lobby_docker_job(
x
}),
resources: Some(Box::new(resources.clone())),
// Gives the game processes time to shut down gracefully.
kill_timeout: Some(60 * 1_000_000_000),
// Intentionally high timeout. Killing jobs is handled manually with signals.
kill_timeout: Some(86400 * 1_000_000_000),
kill_signal: Some("SIGTERM".into()),
log_config: Some(Box::new(LogConfig {
max_files: Some(4),
Expand Down
Loading