1
我有一個新的客戶webhook,無論何時創建一個新客戶,都會發射多次。我已通過API連接確認,在我的測試商店中只存在一個webhook。Shopify&Rails:Webhook被解僱多次
def new_customer_callback <<< ---- gets called multiple times
# here I create a customer in my app,
# but the customer has some custom validations that take a while
head :ok
end
我的想法是,也許webhook不斷髮射,直到頭:好的被返回。因此,因爲我的customers.create自定義驗證需要很長時間,所以webhook被多次解僱。
這是正確的嗎?避免這種情況的好方法是什麼?我不想讓我的應用程序運行多個不必要的回調