{"action":"created","issue":{"url":"https://api.github.com/repos/vend/developer-wiki/issues/6","repository_url":"https://api.github.com/repos/vend/developer-wiki","labels_url":"https://api.github.com/repos/vend/developer-wiki/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/vend/developer-wiki/issues/6/comments","events_url":"https://api.github.com/repos/vend/developer-wiki/issues/6/events","html_url":"https://github.com/vend/developer-wiki/issues/6","id":182944461,"number":6,"title":"Isolate Webhook events that affect stock (race condition issue)","user":{"login":"achadee","id":5952918,"avatar_url":"https://avatars.githubusercontent.com/u/5952918?v=3","gravatar_id":"","url":"https://api.github.com/users/achadee","html_url":"https://github.com/achadee","followers_url":"https://api.github.com/users/achadee/followers","following_url":"https://api.github.com/users/achadee/following{/other_user}","gists_url":"https://api.github.com/users/achadee/gists{/gist_id}","starred_url":"https://api.github.com/users/achadee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achadee/subscriptions","organizations_url":"https://api.github.com/users/achadee/orgs","repos_url":"https://api.github.com/users/achadee/repos","events_url":"https://api.github.com/users/achadee/events{/privacy}","received_events_url":"https://api.github.com/users/achadee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-14T01:41:39Z","updated_at":"2016-10-17T23:56:12Z","closed_at":"2016-10-17T20:03:27Z","body":"You guys trigger multiple webhook events per single action.\r\nfor example \r\n- product save triggers n + 1 events (n = number of variants)\r\n- order create triggers product save and order create\r\n\r\nSome suggestions:\r\n- Don't trigger a product.update event when a sale has been made, It should be up to the developers to integrate all available webhooks to create a functioning system. Multiple events can cause race condition issues that are impossible to mitigate for. (Ive actually had to hard code sleep intervals in the vend integration so orders come before product updates and stock resolves correctly)\r\n- Don't trigger product.update when consignments have been sent or received. Same issue as above"},"comment":{"url":"https://api.github.com/repos/vend/developer-wiki/issues/comments/254368447","html_url":"https://github.com/vend/developer-wiki/issues/6#issuecomment-254368447","issue_url":"https://api.github.com/repos/vend/developer-wiki/issues/6","id":254368447,"user":{"login":"achadee","id":5952918,"avatar_url":"https://avatars.githubusercontent.com/u/5952918?v=3","gravatar_id":"","url":"https://api.github.com/users/achadee","html_url":"https://github.com/achadee","followers_url":"https://api.github.com/users/achadee/followers","following_url":"https://api.github.com/users/achadee/following{/other_user}","gists_url":"https://api.github.com/users/achadee/gists{/gist_id}","starred_url":"https://api.github.com/users/achadee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achadee/subscriptions","organizations_url":"https://api.github.com/users/achadee/orgs","repos_url":"https://api.github.com/users/achadee/repos","events_url":"https://api.github.com/users/achadee/events{/privacy}","received_events_url":"https://api.github.com/users/achadee/received_events","type":"User","site_admin":false},"created_at":"2016-10-17T23:56:12Z","updated_at":"2016-10-17T23:56:12Z","body":"Thanks for that clarification, maybe we are doing something funky with our post requests. I'll review the code later today!\r\n\r\n+1 to the versioning that will be awesome"}}
{"actor":{"display_login":"achadee"}}