Skip to content

Instantly share code, notes, and snippets.

@agmcleod
Created July 6, 2014 04:21
Show Gist options
  • Save agmcleod/206e96272bd8a104f7b1 to your computer and use it in GitHub Desktop.
Save agmcleod/206e96272bd8a104f7b1 to your computer and use it in GitHub Desktop.
# app/jobs/custom_job.rb
class CustomJob < Struct.new(:record_id)
def perform
record = Record.find record_id
record.attachment_one
record.attachment_two
end
end
# Then in your app, queue via:
Delayed::Job.enqueue CustomJob.new(record.id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment