Class: PartyProfileImageWorker
- Inherits:
-
Object
- Object
- PartyProfileImageWorker
- Includes:
- Sidekiq::Job, Sidekiq::Status::Worker
- Defined in:
- app/workers/party_profile_image_worker.rb
Overview
Background worker to lookup and attach profile images for parties.
Uses Clearbit Logo API for company logos.
Class Method Summary collapse
-
.track_in_jobs_panel? ⇒ Boolean
Keep this worker out of the global Jobs panel.
Instance Method Summary collapse
Class Method Details
.track_in_jobs_panel? ⇒ Boolean
Keep this worker out of the global Jobs panel. Every enqueue is an invisible
lazy backfill the user never initiated — fired on contact-card render, on
contact/customer #show, per matched party in the phone popup, on new-customer
creation, and on social-login avatar fetch — with no result page the user is
waiting on. Surfacing it spammed CRM users with "Party Profile Image /
Starting…" toasts (often several per page). Sidekiq::Status is included only
for the admin bulk-enqueue progress, still viewable at /jobs/:jid.
See Sidekiq::TrackEnqueuedStatusJobsMiddleware.
29 |
# File 'app/workers/party_profile_image_worker.rb', line 29 def self.track_in_jobs_panel? = false |
Instance Method Details
#perform(party_id = nil, options = {}) ⇒ Object
34 35 36 37 38 39 40 41 42 |
# File 'app/workers/party_profile_image_worker.rb', line 34 def perform(party_id = nil, = {}) = .symbolize_keys if party_id.nil? bulk_enqueue() else process_party(party_id, ) end end |