Method: Webhookdb::Replicator::Base#enqueue_sync_targets

Defined in:
lib/webhookdb/replicator/base.rb

#enqueue_sync_targetsObject

Some replicators support ‘instant sync’, because they are upserted en-masse rather than row-by-row. That is, usually we run sync targets on a cron, because otherwise we’d need to run the sync target for every row. But if inserting is always done through backfilling, we know we have a useful set of results to sync, so don’t need to wait for cron.



928
929
930
931
932
# File 'lib/webhookdb/replicator/base.rb', line 928

def enqueue_sync_targets
  self.service_integration.sync_targets.each do |stgt|
    Webhookdb::Jobs::SyncTargetRunSync.perform_async(stgt.id)
  end
end