Class: Webhookdb::Jobs::SyncTargetEnqueueScheduled

Inherits:
Object
  • Object
show all
Extended by:
Async::ScheduledJob
Defined in:
lib/webhookdb/jobs/sync_target_enqueue_scheduled.rb

Instance Method Summary collapse

Methods included from Async::ScheduledJob

extended

Instance Method Details

#_performObject



11
12
13
14
15
# File 'lib/webhookdb/jobs/sync_target_enqueue_scheduled.rb', line 11

def _perform
  Webhookdb::SyncTarget.due_for_sync(as_of: Time.now).select(:id, :period_seconds).each do |st|
    Webhookdb::Jobs::SyncTargetRunSync.perform_in(st.jitter, st.id)
  end
end