Files
ubicloud/migrate/20240705_change_runner_core_limit.rb
Benjamin Satzger 904bc5b0d9 Reduce runner_core_limit from 300 to 150
The logic to check active runner concurrency was previously changed to
count cores instead of vCPUs. For x64 a core corresponds to 2 vCPUs.
This commit updates runner_core_limit from 300 (vCPUs) to 150 (cores).
2024-07-05 12:25:01 +02:00

20 lines
402 B
Ruby

# frozen_string_literal: true
Sequel.migration do
up do
alter_table(:project) do
set_column_default :runner_core_limit, 150
end
run "UPDATE project SET runner_core_limit = runner_core_limit / 2"
end
down do
alter_table(:project) do
set_column_default :runner_core_limit, 300
end
run "UPDATE project SET runner_core_limit = runner_core_limit * 2"
end
end