Closed dgrigg closed 1 month ago
Did you try the resolution from that issue of using a queue with only one worker?
Failing that the other option would be to only listen for the update webhook. We could update the docs to that effect.
Updating the supervisor settings to use 1 proc. Will let you know
Using 1 proc solved the issue. Ideally there's a way to make this work with multiple process, which is nice especially when dealing with bulk Shopify updates to products.
It would work fine with multi process if you remove the create webhook. By the looks of things shopify is firing the update when you create (strange but it is).
That's true
Can confirm that worked but it still feels dirty. If there's a way to prevent that from happening it would be great.
Description
Whenever a product is created in Shopify two duplicated items are getting created in Statamic. From Shopify I can see the 'create' and 'update' webhook both get sent right after product creation in Shopify. It's happening on our staging server which is using Redis for the queue. Locally I'm running the queue via the database and I don't have the duplication issue (using ngrok to receive incoming webhooks). I found this closed issue which looks similar https://github.com/statamic-rad-pack/shopify/issues/95 but that was closed 2 years ago and this issue is still popping up.
Steps to reproduce
Environment
Environment Application Name: Statamic Laravel Version: 10.48.22 PHP Version: 8.2.19 Composer Version: 2.7.6 Environment: local Debug Mode: ENABLED URL: localhost:3000 Maintenance Mode: OFF
Cache Config: NOT CACHED Events: NOT CACHED Routes: NOT CACHED Views: CACHED
Drivers Broadcasting: log Cache: file Database: mysql Logs: stack / single Mail: smtp Queue: database Session: file
Statamic Addons: 3 Sites: 1 Stache Watcher: Disabled Static Caching: Disabled Version: 5.25.0 PRO
Statamic Addons aerni/advanced-seo: 2.9.0 pxlp/headless: dev-main statamic-rad-pack/shopify: 4.0.3