* Add http_header to FastText for Fastly compatibility * Update app/services/articles/enrich_image_attributes.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update app/services/html/parser.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update spec/models/display_ad_spec.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix rubocop * Also accept canges to main image for this re-calc * Rename display_ad_spec for compatibility with main --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
17 lines
414 B
Ruby
17 lines
414 B
Ruby
module Articles
|
|
class EnrichImageAttributesWorker
|
|
include Sidekiq::Job
|
|
|
|
sidekiq_options queue: :high_priority, retry: 5, lock: :until_executing
|
|
|
|
def perform(article_id)
|
|
article = Article.find_by(id: article_id)
|
|
return unless article
|
|
|
|
detected = Articles::EnrichImageAttributes.call(article)
|
|
return unless detected
|
|
|
|
EdgeCache::BustArticle.call(article)
|
|
end
|
|
end
|
|
end
|