2025-02-26 13:26:37 +01:00
|
|
|
# typed: strict
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2025-03-13 14:50:03 +00:00
|
|
|
module Services
|
2025-02-26 13:26:37 +01:00
|
|
|
module Commands
|
|
|
|
module Stop
|
|
|
|
TRIGGERS = %w[stop unload terminate term t u].freeze
|
|
|
|
|
|
|
|
sig {
|
2025-03-13 14:50:03 +00:00
|
|
|
params(targets: T::Array[Services::FormulaWrapper],
|
2025-02-26 13:26:37 +01:00
|
|
|
verbose: T.nilable(T::Boolean),
|
|
|
|
no_wait: T.nilable(T::Boolean),
|
|
|
|
max_wait: T.nilable(Float)).void
|
|
|
|
}
|
|
|
|
def self.run(targets, verbose:, no_wait:, max_wait:)
|
2025-03-13 14:50:03 +00:00
|
|
|
Services::Cli.check(targets)
|
|
|
|
Services::Cli.stop(targets, verbose:, no_wait:, max_wait:)
|
2025-02-26 13:26:37 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|