* Use pick instead of pluck first * Use touch_all instead of update_all * Use destroy_by instead of where.destroy_all * Use scopes * Fix db:seed:replant * Remove ActiveSupport::Cache::RedisCacheStore expires_in cache
11 lines
269 B
Ruby
11 lines
269 B
Ruby
module Webhook
|
|
class DestroyWorker
|
|
include Sidekiq::Worker
|
|
|
|
sidekiq_options queue: :low_priority, retry: 10
|
|
|
|
def perform(user_id, application_id)
|
|
Webhook::Endpoint.destroy_by(user_id: user_id, oauth_application_id: application_id)
|
|
end
|
|
end
|
|
end
|