{"action":"opened","issue":{"url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/1304","repository_url":"https://api.github.com/repos/spatie/laravel-medialibrary","labels_url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/1304/labels{/name}","comments_url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/1304/comments","events_url":"https://api.github.com/repos/spatie/laravel-medialibrary/issues/1304/events","html_url":"https://github.com/spatie/laravel-medialibrary/issues/1304","id":379677729,"node_id":"MDU6SXNzdWUzNzk2Nzc3Mjk=","number":1304,"title":"Media model not found when created within transaction","user":{"login":"chancezeus","id":2089196,"node_id":"MDQ6VXNlcjIwODkxOTY=","avatar_url":"https://avatars1.githubusercontent.com/u/2089196?v=4","gravatar_id":"","url":"https://api.github.com/users/chancezeus","html_url":"https://github.com/chancezeus","followers_url":"https://api.github.com/users/chancezeus/followers","following_url":"https://api.github.com/users/chancezeus/following{/other_user}","gists_url":"https://api.github.com/users/chancezeus/gists{/gist_id}","starred_url":"https://api.github.com/users/chancezeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chancezeus/subscriptions","organizations_url":"https://api.github.com/users/chancezeus/orgs","repos_url":"https://api.github.com/users/chancezeus/repos","events_url":"https://api.github.com/users/chancezeus/events{/privacy}","received_events_url":"https://api.github.com/users/chancezeus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-12T08:56:50Z","updated_at":"2018-11-12T08:56:50Z","closed_at":null,"author_association":"NONE","body":"When handling image upload within a (larger) transaction the queue job is fired before the transaction is committed. This causes the transformations \r\nI would suggest adding a configurable delay to the job dispatch to allow the user to delay the actual conversions for a few seconds so any transaction has time to complete before the job is run (and fails because it cannot find the DB entry yet)."}}
{"actor":{"display_login":"chancezeus"}}