Class: ArticleLinkCheckerWorker
- Inherits:
-
Object
- Object
- ArticleLinkCheckerWorker
- Includes:
- Sidekiq::Job, Workers::StatusBroadcastable
- Defined in:
- app/workers/article_link_checker_worker.rb
Overview
Processes link checks for articles. Supports three 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.
Incremental nightly mode (called with incremental: true):
Finds articles modified since their last audit and runs
the auditor on each. Designed to run alongside the nightly crawler.
Instance Attribute Summary
Attributes included from Workers::StatusBroadcastable
Instance Method Summary collapse
Methods included from Workers::StatusBroadcastable::Overrides
Instance Method Details
#perform(options = {}) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/workers/article_link_checker_worker.rb', line 24 def perform( = {}) = .is_a?(Hash) ? .symbolize_keys : {} if [:incremental] run_incremental_audit() elsif [:article_ids] run_article_audit([:article_ids], ) else run_legacy_check() end end |