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

Version Path
rocketjob-5.4.1 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.4.0 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.4.0.beta2 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.4.0.beta1 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.3.3 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.3.2 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.3.1 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.3.0 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.2.0 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.2.0.beta3 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.2.0.beta2 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.2.0.beta1 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.1.1 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.1.0 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.0.0 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.0.0.rc1 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.0.0.beta4 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.0.0.beta3 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb
rocketjob-5.0.0.beta2 lib/rocket_job/jobs/on_demand_batch_tabular_job.rb