Class: BatchManager::Executor
- Inherits:
-
Object
- Object
- BatchManager::Executor
- Includes:
- Utils
- Defined in:
- lib/batch_manager/executor.rb
Class Method Summary collapse
Methods included from Utils
Class Method Details
.exec(batch_file, options = {}) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/batch_manager/executor.rb', line 6 def exec(batch_file, = {}) @batch_file_path = batch_full_path(batch_file) if File.exist?(@batch_file_path) @batch_status = BatchManager::BatchStatus.new(@batch_file_path) @wet = [:wet] @disable_stdout = [:daemon] if [:force] || !@wet || @batch_status.can_run? log_run_duration { exec_batch_script } else raise "Cannot run this batch." end else raise "File not exist." end end |