Class: RocketJob::Jobs::OnDemandBatchJob
- Inherits:
-
RocketJob::Job
- Object
- RocketJob::Job
- RocketJob::Jobs::OnDemandBatchJob
- Includes:
- Batch, Batch::Statistics, Plugins::Cron, Plugins::Retry
- Defined in:
- lib/rocket_job/jobs/on_demand_batch_job.rb
Instance Method Summary collapse
-
#add_output_category(**args) ⇒ Object
Add a new output category and collect output for it.
-
#slice_size=(slice_size) ⇒ Object
Shortcut for setting the slice_size.
Methods included from Batch::Statistics
Methods included from Batch::IO
#download, #input, #output, #upload, #upload_arel, #upload_integer_range, #upload_integer_range_in_reverse_order, #upload_mongo_query, #upload_slice
Methods included from Batch::Categories
#input_category, #input_category?, #merge_input_categories, #merge_output_categories, #output_category, #output_category?
Methods included from Batch::Worker
#rocket_job_active_workers, #rocket_job_batch_callbacks, #rocket_job_batch_complete?, #rocket_job_batch_fail!, #rocket_job_batch_perform, #rocket_job_batch_run_after_callbacks, #rocket_job_batch_run_before_callbacks, #rocket_job_batch_throttled?, #rocket_job_perform_slice, #rocket_job_process_slice, #rocket_job_work, #work_first_slice
Methods included from Batch::StateMachine
Methods included from Batch::Model
#percent_complete, #status, #upload_file_name, #upload_file_name=, #worker_count, #worker_names
Methods included from Plugins::Retry
#rocket_job_failure_count, #rocket_job_retry_on_fail?
Methods included from Plugins::Cron
Methods included from Plugins::Job::Throttle
#throttle_filter_class, #throttle_filter_id
Methods included from Plugins::Job::Worker
#fail_on_exception!, #perform, #perform_now, #rocket_job_active_workers, #rocket_job_work
Methods included from Plugins::Job::StateMachine
Methods included from Plugins::Job::Persistence
#create_restart!, #reload, #save_with_retry!
Methods included from Plugins::Job::Model
#as_json, #duration, #expired?, #run_now!, #scheduled?, #scheduled_at, #seconds, #sleeping?, #status, #worker_count, #worker_names, #worker_on_server?
Instance Method Details
#add_output_category(**args) ⇒ Object
Add a new output category and collect output for it.
107 108 109 |
# File 'lib/rocket_job/jobs/on_demand_batch_job.rb', line 107 def add_output_category(**args) self.output_categories << RocketJob::Category::Output.new(**args) end |
#slice_size=(slice_size) ⇒ Object
Shortcut for setting the slice_size
102 103 104 |
# File 'lib/rocket_job/jobs/on_demand_batch_job.rb', line 102 def slice_size=(slice_size) input_category.slice_size = slice_size end |