Class: GoogleMerchantReportSyncWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Job
Defined in:
app/workers/google_merchant_report_sync_worker.rb

Overview

Pulls the Merchant API's product_view report and persists it onto each
CatalogItem (google_report). Reconciling into ListingIssue rows is
ListingIssueSyncWorker's job (it already runs every registered provider
adapter, including ListingIssues::GoogleAdapter) — this worker only needs
to run BEFORE that one so the day's report is in place when the reconcile
reads it, same ordering as the Wayfair catalog pull vs. its sync.

Instance Method Summary collapse

Instance Method Details

#performObject

Runs the job.

Returns:

  • (Object)

    the result



20
21
22
23
# File 'app/workers/google_merchant_report_sync_worker.rb', line 20

def perform
  result = Feed::Google::MerchantApi::ReportPuller.new(logger:).pull
  logger.info "[GoogleMerchantReportSyncWorker] pull complete: #{result.to_h}"
end