Class: SalesforceChunker::SingleBatchJob

Inherits:
Job
  • Object
show all
Defined in:
lib/salesforce_chunker/single_batch_job.rb

Constant Summary

Constants inherited from Job

Job::DEFAULT_RETRY_SECONDS, Job::DEFAULT_TIMEOUT_SECONDS, Job::QUERY_OPERATIONS

Instance Attribute Summary

Attributes inherited from Job

#batches_count

Instance Method Summary collapse

Methods inherited from Job

#close, #create_batch, #download_results, #get_batch_results, #get_batch_statuses, #get_completed_batches, #retrieve_batch_results, #retrieve_raw_results, #retrieve_results

Constructor Details

#initialize(connection:, object:, operation:, **options) ⇒ SingleBatchJob

Returns a new instance of SingleBatchJob.



3
4
5
6
7
8
9
10
# File 'lib/salesforce_chunker/single_batch_job.rb', line 3

def initialize(connection:, object:, operation:, **options)
  super(connection: connection, object: object, operation: operation, **options)
  payload = options[:payload] || options[:query]
  @log.info "Using Single Batch"
  @batch_id = create_batch(payload)
  @batches_count = 1
  close
end