Sha256: 6044bce6115b429438c488be14ffd008bf23ac8e710423c45cddae884a8f92cf
Contents?: true
Size: 510 Bytes
Versions: 2
Compression:
Stored size: 510 Bytes
Contents
module Vidar class DeployStatus INITIAL_SLEEP = 2 SLEEP = 10 MAX_TRIES = 30 attr_reader :namespace def initialize(namespace) @namespace = namespace end def error? any_errors = false sleep(INITIAL_SLEEP) until K8s::Pods.new(namespace).all_ready? tries += 1 sleep(SLEEP) if tries > MAX_TRIES any_errors = true break end end any_errors end def ok? !error? end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vidar-0.3.3 | lib/vidar/deploy_status.rb |
vidar-0.3.2 | lib/vidar/deploy_status.rb |