mirror of
https://github.com/Neetpone/foalfetch.git
synced 2025-02-08 18:06:43 +01:00
11 lines
251 B
Ruby
11 lines
251 B
Ruby
# frozen_string_literal: true
|
|
|
|
class IndexUpdateJob < ApplicationJob
|
|
queue_as :high
|
|
def perform(cls, id)
|
|
obj = cls.constantize.find(id)
|
|
obj&.update_index(defer: false)
|
|
rescue StandardError => e
|
|
Rails.logger.error e.message
|
|
end
|
|
end
|