diff --git a/app/jobs/product_sync_job.rb b/app/jobs/product_sync_job.rb new file mode 100644 index 00000000..b4f058f2 --- /dev/null +++ b/app/jobs/product_sync_job.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class ProductSyncJob < ApplicationJob + queue_as :default + rescue_from(StandardError) do |exception| + Sentry.capture_message(exception) + end + + retry_on StandardError, wait: :exponentially_longer, attempts: 5 + + def perform(tenant, options = {}) + Product.synchronize_bling(tenant, options) + end +end