Sha256: ec32acfc8897502af5df37f6c45522e5ba21e7a230555a78de7f141c5a97b5c7
Contents?: true
Size: 1.51 KB
Versions: 3
Compression:
Stored size: 1.51 KB
Contents
module CapistranoMulticonfigParallel # class used as a wrapper around capistrano class Application < Capistrano::Application def name 'multi_cap' end def sort_options(options) super.push(multi_debug, multi_progress, multi_secvential) end def multi_debug ['--multi-debug', '-D', 'Sets the debug enabled for celluloid actors', lambda do |_value| CapistranoMulticonfigParallel::CelluloidManager.debug_enabled = true Celluloid.task_class = Celluloid::TaskThread end ] end def multi_progress ['--multi-progress', '--multi-progress', 'Sets the debug enabled for celluloid actors', lambda do |_value| CapistranoMulticonfigParallel.show_task_progress = true end ] end def multi_secvential ['--multi-secvential', '--multi-secvential', 'Sets the debug enabled for celluloid actors', lambda do |_value| CapistranoMulticonfigParallel.execute_in_sequence = true end ] end def top_level job_manager = multi_manager_class.new(self, top_level_tasks, stages) if job_manager.can_start? && !options.show_prereqs && !options.show_tasks job_manager.start else super end end def multi_apps? stages.find { |stage| stage.include?(':') }.present? end def multi_manager_class multi_apps? ? CapistranoMulticonfigParallel::MultiAppManager : CapistranoMulticonfigParallel::SingleAppManager end end end
Version data entries
3 entries across 3 versions & 1 rubygems