mirror of
https://github.com/Neetpone/foalfetch.git
synced 2025-02-08 18:06:43 +01:00
12 lines
259 B
Ruby
12 lines
259 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) if obj
|
||
|
rescue StandardError => ex
|
||
|
Rails.logger.error ex.message
|
||
|
end
|
||
|
end
|