2017-01-20 00:00:14 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class LinkCrawlWorker
|
|
|
|
include Sidekiq::Worker
|
|
|
|
|
2017-10-06 19:39:08 +01:00
|
|
|
sidekiq_options queue: 'pull', retry: 0
|
2017-01-20 00:00:14 +00:00
|
|
|
|
|
|
|
def perform(status_id)
|
|
|
|
FetchLinkCardService.new.call(Status.find(status_id))
|
2024-01-16 08:35:54 +00:00
|
|
|
rescue ActiveRecord::RecordNotFound, ActiveRecord::RecordNotUnique
|
2017-01-20 00:00:14 +00:00
|
|
|
true
|
|
|
|
end
|
|
|
|
end
|