Skip to content

Instantly share code, notes, and snippets.

@pmatsinopoulos
Created April 13, 2025 05:00
Show Gist options
  • Save pmatsinopoulos/9908d5d43ba95994d72d8cb918765929 to your computer and use it in GitHub Desktop.
Save pmatsinopoulos/9908d5d43ba95994d72d8cb918765929 to your computer and use it in GitHub Desktop.
Long Running Batch Job Framework
class LongRunningBatchJob < ApplicationJob
queue_as :default
include EnqueueableJob
def perform(batch_id)
batch = Batch.find(batch_id)
process_enqueued_job(queueable: batch) do
# do the long running batch job
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment