Class: Kiba::Extend::Jobs::NullJob
- Defined in:
- lib/kiba/extend/jobs/null_job.rb
Overview
Placeholder job that reports that given name (or generic null job) was run, but does not actually try to run a real job.
This is useful in projects with dynamically-defined or registered jobs when some dependency jobs (sources, lookups) may not return any output yet (or ever).
Instance Attribute Summary
Attributes inherited from BaseJob
#files, #srcrows, #transformer
Instance Method Summary collapse
-
#initialize(name = nil, files:) ⇒ NullJob
constructor
A new instance of NullJob.
-
#outrows ⇒ Object
-
#run ⇒ Object
Methods inherited from BaseJob
Methods included from Parser
Methods included from Runnable
#add_config, #add_decoration, #add_destinations, #add_lookup, #add_sources, #assemble_control, #lookups_to_memoized_methods, #parse_job_segments, #show_me_decoration, #sources, #tell_me_decoration, #transform
Methods included from Reportable
#desc_and_tags, #get_duration, #minimal_end, #minimal_start, #normal_end, #normal_start, #put_file_details, #report_run_end, #report_run_start, #row_report, #start_and_def, #start_label, #tags, #verbose_end, #verbose_start
Methods included from DependencyHandleable
#check_requirements, #destinations, #file_config, #handle_requirements, #prep_file, #setup_file_for, #setup_files, #setup_files_for, #setup_source_for, #sources
Constructor Details
#initialize(name = nil, files:) ⇒ NullJob
Returns a new instance of NullJob.
16 17 18 |
# File 'lib/kiba/extend/jobs/null_job.rb', line 16 def initialize(name = nil, files:) super(files: files, transformer: nil) end |
Instance Method Details
#outrows ⇒ Object
24 |
# File 'lib/kiba/extend/jobs/null_job.rb', line 24 def outrows = 0 |
#run ⇒ Object
20 21 22 |
# File 'lib/kiba/extend/jobs/null_job.rb', line 20 def run puts "#{destination_key} was run as Kiba::Extend::Jobs::NullJob" end |