unepwcmc/SAPI

View on GitHub
app/workers/event_listing_changes_copy_worker.rb

Summary

Maintainability
A
0 mins
Test Coverage
class EventListingChangesCopyWorker
  include Sidekiq::Worker
  sidekiq_options :queue => :admin, :retry => false, :backtrace => 50

  def perform(from_event_id, to_event_id)
    ApplicationRecord.connection.execute <<-SQL
      SELECT * FROM copy_listing_changes_across_events(
        #{from_event_id},
        #{to_event_id}
      )
    SQL
  end
end