Class: Ocak::PipelineRunner
- Inherits:
-
Object
- Object
- Ocak::PipelineRunner
- Defined in:
- lib/ocak/pipeline_runner.rb
Instance Attribute Summary collapse
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
Instance Method Summary collapse
-
#initialize(config:, options: {}) ⇒ PipelineRunner
constructor
A new instance of PipelineRunner.
- #run ⇒ Object
-
#run_pipeline(issue_number, logger:, claude:, chdir: nil, skip_steps: [], complexity: 'full', skip_merge: false) ⇒ Object
rubocop:disable Metrics/ParameterLists.
- #shutting_down? ⇒ Boolean
Methods included from ShutdownHandling
#print_shutdown_summary, #shutdown!
Methods included from FailureReporting
Constructor Details
#initialize(config:, options: {}) ⇒ PipelineRunner
Returns a new instance of PipelineRunner.
25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/ocak/pipeline_runner.rb', line 25 def initialize(config:, options: {}) @config = config @options = @watch_formatter = [:watch] ? WatchFormatter.new : nil @shutting_down = false @shutdown_count = 0 @active_issues = [] @interrupted_issues = [] @active_mutex = Mutex.new @registry = ProcessRegistry.new @executor = PipelineExecutor.new(config: config, shutdown_check: -> { @shutting_down }) end |
Instance Attribute Details
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
23 24 25 |
# File 'lib/ocak/pipeline_runner.rb', line 23 def registry @registry end |
Instance Method Details
#run ⇒ Object
38 39 40 |
# File 'lib/ocak/pipeline_runner.rb', line 38 def run @options[:single] ? run_single(@options[:single]) : run_loop end |
#run_pipeline(issue_number, logger:, claude:, chdir: nil, skip_steps: [], complexity: 'full', skip_merge: false) ⇒ Object
rubocop:disable Metrics/ParameterLists
42 43 44 45 46 47 |
# File 'lib/ocak/pipeline_runner.rb', line 42 def run_pipeline(issue_number, logger:, claude:, chdir: nil, skip_steps: [], complexity: 'full', # rubocop:disable Metrics/ParameterLists skip_merge: false) @executor.run_pipeline(issue_number, logger: logger, claude: claude, chdir: chdir, skip_steps: skip_steps, complexity: complexity, skip_merge: skip_merge) end |
#shutting_down? ⇒ Boolean
49 50 51 |
# File 'lib/ocak/pipeline_runner.rb', line 49 def shutting_down? @shutting_down end |