gab-social/app/workers/link_crawl_worker.rb

14 lines
263 B
Ruby
Raw Normal View History

2019-07-02 08:10:25 +01:00
# frozen_string_literal: true
class LinkCrawlWorker
include Sidekiq::Worker
sidekiq_options queue: 'pull', retry: 3
2019-07-02 08:10:25 +01:00
def perform(status_id)
FetchLinkCardService.new.call(Status.find(status_id))
rescue ActiveRecord::RecordNotFound
true
end
end