Class: ArticleLinkCheckerWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job, Workers::StatusBroadcastable
Defined in:
app/workers/article_link_checker_worker.rb

Overview

Processes link checks for articles. Supports two modes:

Legacy mode (default when called with link hrefs or no args):
Processes pending LinkCheck records for external links.

Audit mode (called with article_ids: [...]):
Runs the unified ArticleLinkAuditor on specific articles,
persisting results and updating the editorial link graph.
Supports job status tracking with redirect_to for the CRM UI.

Instance Attribute Summary

Attributes included from Workers::StatusBroadcastable

#broadcast_status_updates

Instance Method Summary collapse

Methods included from Workers::StatusBroadcastable::Overrides

#at, #store, #total

Instance Method Details

#perform(options = {}) ⇒ Object



20
21
22
23
24
25
26
27
28
# File 'app/workers/article_link_checker_worker.rb', line 20

def perform(options = {})
  options = options.is_a?(Hash) ? options.symbolize_keys : {}

  if options[:article_ids]
    run_article_audit(options[:article_ids], options)
  else
    run_legacy_check(options)
  end
end