Process Shopify webhooks asynchronously

This commit is contained in:
2026-08-12 18:15:24 +02:00
parent 1e75ef7a24
commit 8c4b9a7f89
5 changed files with 195 additions and 29 deletions
@@ -0,0 +1,13 @@
BEGIN;
ALTER TABLE shopify_webhook_event
DROP CONSTRAINT IF EXISTS chk_shopify_webhook_event_status;
ALTER TABLE shopify_webhook_event
ADD CONSTRAINT chk_shopify_webhook_event_status
CHECK (status IN ('received', 'processing', 'processed', 'duplicate', 'failed'));
CREATE INDEX IF NOT EXISTS idx_shopify_webhook_event_processing
ON shopify_webhook_event(status, received_at, id);
COMMIT;