Files
kamal/lib/mrsk/configuration/boot.rb
2023-04-14 12:46:14 +01:00

20 lines
364 B
Ruby

class Mrsk::Configuration::Boot
def initialize(config:)
@options = config.raw_config.boot || {}
@host_count = config.all_hosts.count
end
def group_limit
limit = @options["group_limit"]
if limit.to_s.end_with?("%")
@host_count * limit.to_i / 100
else
limit
end
end
def group_wait
@options["group_wait"]
end
end