Merge pull request #222 from basecamp/deploy-groups

Allow booting containers in groups for rolling restarts
This commit is contained in:
David Heinemeier Hansson
2023-05-02 13:14:32 +02:00
committed by GitHub
9 changed files with 121 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
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