Class: ShopifyGraphql::UpdateWebhooksJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- ShopifyGraphql::UpdateWebhooksJob
- Defined in:
- lib/shopify_graphql/jobs/update_webhooks_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(shop_domain:, shop_token:) ⇒ Object
9 10 11 12 13 14 15 16 17 18 |
# File 'lib/shopify_graphql/jobs/update_webhooks_job.rb', line 9 def perform(shop_domain:, shop_token:) webhooks = ShopifyGraphql.configuration.webhooks ShopifyAPI::Auth::Session.temp(shop: shop_domain, access_token: shop_token) do manager = WebhooksManager.new(webhooks) manager.recreate_webhooks! end rescue UnauthorizedAccess, ResourceNotFound, ForbiddenAccess, PaymentRequired # Ignore end |