shopify-api-ruby: Invisible error when updating large number of products

Hello,

First, thanks for the great work with the gem. I unfortunately have a weird issue:

  • I have a local DB of around 7000 products. They need daily modifications
  • Once a day, I iterate on my products and send the modifications to Shopify. Of course, I respect the Shopify API limit (and rescue to relaunch when I send too many requests)
  • I never get any error but unfortunately, only around 5000 products really get updated in Shopify. I don’t get what happens to the other ones…

My code (with only the relevant parts):

saved = @shopify_product.update_attributes(shopify_hash.attributes)
Rails.logger.info("ShopifyProduct #{@shopify_product.id} updated: #{@shopify_product.to_json}") if saved

But in the product below for example, I get the logs below but the product is not updated in Shopify (cf picture). See the tags for example.

ShopifyProduct 4806834815061 updated: {"id":4806834815061,"title":"Rasoir Surete Manche Bambou Bambaw","body_html":null,"vendor":"BAMBAW","product_type":"Maison Et Produits D'entretien","created_at":"2020-11-13T16:58:44+01:00","handle":"82783","updated_at":"2020-12-07T14:15:08+01:00","published_at":null,"template_suffix":null,"published_scope":"web","tags":"CATALOGUEBIO@NOTFOUND, famille@Maison Et Produits D'entretien, id_sous-famille@9005, Maison Et Produits D'entretien_Soins Du Corps, maj@07/12/2020, prix@piece, sous-famille@Maison Et Produits D'entretien_Soins Du Corps, tva2000, tva@tva2000","admin_graphql_api_id":"gid://shopify/Product/4806834815061","variants":[{"id":32884166950997,"title":"Default Title","price":"21.99","sku":"82783","position":1,"inventory_policy":"deny","compare_at_price":null,"fulfillment_service":"manual","inventory_management":null,"option1":"Default Title","option2":null,"option3":null,"created_at":"2020-11-13T16:58:44+01:00","updated_at":"2020-11-13T16:58:44+01:00","taxable":true,"barcode":"5430000934251","grams":1000,"image_id":null,"weight":1000.0,"weight_unit":"g","inventory_item_id":34847234424917,"inventory_quantity":0,"old_inventory_quantity":0,"requires_shipping":true,"admin_graphql_api_id":"gid://shopify/ProductVariant/32884166950997"}],"options":[{"id":6270715854933,"product_id":4806834815061,"name":"Title","position":1,"values":["Default Title"]}],"images":[{"id":15709656645717,"position":1,"created_at":"2020-11-30T16:35:35+01:00","updated_at":"2020-12-01T14:20:17+01:00","alt":null,"width":1500,"height":1500,"src":"https://cdn.shopify.com/s/files/1/0264/9299/3621/products/Eco-friendly-razor.jpg?v=1606828817","variant_ids":[],"admin_graphql_api_id":"gid://shopify/ProductImage/15709656645717"}],"image":{"id":15709656645717,"position":1,"created_at":"2020-11-30T16:35:35+01:00","updated_at":"2020-12-01T14:20:17+01:00","alt":null,"width":1500,"height":1500,"src":"https://cdn.shopify.com/s/files/1/0264/9299/3621/products/Eco-friendly-razor.jpg?v=1606828817","variant_ids":[],"admin_graphql_api_id":"gid://shopify/ProductImage/15709656645717"},"metafields":[]}

image

Do you have any idea of the reason? I really don’t have a clue as I don’t receive any error… Thanks so much, Damien

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 19 (8 by maintainers)

Most upvoted comments

@damienlethiec If you are able to share the store ID, that may help us to trace the issue.

(you can email it to andy.waite at shopify.com if you prefer not to post publicly).