Files
kamal/lib/mrsk/configuration/boot.rb
2023-05-02 13:11:31 +02:00

21 lines
341 B
Ruby

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