Sha256: a27be3192e9921eec1ee3d0b7292dcadb874fbb74337ea6f9984b32fd8b96c67
Contents?: true
Size: 951 Bytes
Versions: 19
Compression:
Stored size: 951 Bytes
Contents
# Job to dynamically perform ruby code on demand as a Batch, # with input and/or output from CSV/JSON or other format supported by Tabular. # # Nodes: # - Need to specify `destroy_on_complete: false` to collect output from this job. # - `after_code` can be used to automatically download the output of this job to a file on completion. # # Example: Iterate over all rows in a table: # code = <<-CODE # if user = User.find(row) # user.cleanse_attributes! # user.save(validate: false) # end # CODE # job = RocketJob::Jobs::OnDemandBatchTabularJob.new(code: code, description: 'cleanse users', destroy_on_complete: false) # job.upload("users.csv") # job.save! # # On completion export the output: # job.download("output.csv") module RocketJob module Jobs class OnDemandBatchTabularJob < OnDemandBatchJob include RocketJob::Batch::Tabular::Input include RocketJob::Batch::Tabular::Output end end end
Version data entries
19 entries across 19 versions & 1 rubygems