Created
April 13, 2025 05:00
-
-
Save pmatsinopoulos/9908d5d43ba95994d72d8cb918765929 to your computer and use it in GitHub Desktop.
Long Running Batch Job Framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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