Module: AsyncTask::BaseAttemptBatchJob
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/async_task/jobs/base_attempt_batch_job.rb
Instance Method Summary collapse
Instance Method Details
#perform ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/async_task/jobs/base_attempt_batch_job.rb', line 11 def perform unless_already_executing do ::AsyncTask::Attempt.pending.where('scheduled_at IS ? OR scheduled_at < ?', nil, Time.current).find_each do |task| ::AsyncTask::AttemptJob.perform_later(task) end end end |