Class: ScheduleWorkers::GoogleReserve::ServiceFeedsWorker

Inherits:
ApplicationWorker
  • Object
show all
Includes:
ElasticAPM::SpanHelpers
Defined in:
app/workers/schedule_workers/google_reserve/service_feeds_worker.rb

Overview

ServiceFeedsWorker is a Sidekiq worker that delegates Google Reserve service feed generation to VendorsService::GoogleReserve::ServiceFeedsService

This worker serves as a thin wrapper around the service class to handle background job execution, while the actual business logic for generating Google Reserve service feeds is encapsulated in the service layer for better organization and testability.

Job Configuration

  • Queue: :critical (high priority processing)

  • Retry: 2 attempts on failure

  • Lock: :until_executed to prevent duplicate concurrent executions

  • Backtrace: enabled for better error debugging

Dependencies

  • VendorsService::GoogleReserve::ServiceFeedsService: Contains all business logic

  • Flipper feature flag: :google_reserve_e2e must be enabled

Instance Method Summary collapse

Instance Method Details

#performvoid

This method returns an undefined value.

Main entry point for the service feed generation process Delegates to VendorsService::GoogleReserve::ServiceFeedsService

Raises:

  • (StandardError)

    Any unhandled errors are reported to APM



27
28
29
30
31
32
# File 'app/workers/schedule_workers/google_reserve/service_feeds_worker.rb', line 27

def perform
  return unless Flipper.enabled?(:google_reserve_e2e)

  service = VendorsService::GoogleReserve::ServiceFeedsService.new
  service.generate_and_upload_feed
end