{"action":"created","issue":{"url":"https://api.github.com/repos/mnapoli/bref/issues/118","repository_url":"https://api.github.com/repos/mnapoli/bref","labels_url":"https://api.github.com/repos/mnapoli/bref/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/mnapoli/bref/issues/118/comments","events_url":"https://api.github.com/repos/mnapoli/bref/issues/118/events","html_url":"https://github.com/mnapoli/bref/issues/118","id":392806546,"node_id":"MDU6SXNzdWUzOTI4MDY1NDY=","number":118,"title":"Laravel queue driver","user":{"login":"barryvdh","id":973269,"node_id":"MDQ6VXNlcjk3MzI2OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/973269?v=4","gravatar_id":"","url":"https://api.github.com/users/barryvdh","html_url":"https://github.com/barryvdh","followers_url":"https://api.github.com/users/barryvdh/followers","following_url":"https://api.github.com/users/barryvdh/following{/other_user}","gists_url":"https://api.github.com/users/barryvdh/gists{/gist_id}","starred_url":"https://api.github.com/users/barryvdh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barryvdh/subscriptions","organizations_url":"https://api.github.com/users/barryvdh/orgs","repos_url":"https://api.github.com/users/barryvdh/repos","events_url":"https://api.github.com/users/barryvdh/events{/privacy}","received_events_url":"https://api.github.com/users/barryvdh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-12-19T22:43:38Z","updated_at":"2018-12-21T18:36:46Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"So this might be out-of-scope, but with the bootstrap method etc, I was thinking of a Laravel queue driver. Where each job is just the event basically (as jobs are stored as json mostly anyways)\r\n\r\n - Bootstrap start the queue worker (`passthru(\"cd app && /opt/bin/php -c/opt/php.ini artisan queue:work lambda\");`)\r\n- In the application code, jobs are dispatched by invoking the function with the payload in the event (eg `dispatch(new SomeJob)->onQueue('lambda');`), using the aws php API.\r\n - Queue worker on Lambda is responsible for popping jobs, which is just calling the Lambda API endpoint to get a new event\r\n- After job is done, output is sent to the Success/Fail endpoints\r\n\r\nSo the queue worker should always be idling until a job is incoming, which should work fast (eg. no need to Bootstrap laravel/start CLI command). And Laravel has methods for checking for memory etc + easy dispatch."},"comment":{"url":"https://api.github.com/repos/mnapoli/bref/issues/comments/449465520","html_url":"https://github.com/mnapoli/bref/issues/118#issuecomment-449465520","issue_url":"https://api.github.com/repos/mnapoli/bref/issues/118","id":449465520,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTQ2NTUyMA==","user":{"login":"pmayet","id":1593076,"node_id":"MDQ6VXNlcjE1OTMwNzY=","avatar_url":"https://avatars3.githubusercontent.com/u/1593076?v=4","gravatar_id":"","url":"https://api.github.com/users/pmayet","html_url":"https://github.com/pmayet","followers_url":"https://api.github.com/users/pmayet/followers","following_url":"https://api.github.com/users/pmayet/following{/other_user}","gists_url":"https://api.github.com/users/pmayet/gists{/gist_id}","starred_url":"https://api.github.com/users/pmayet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmayet/subscriptions","organizations_url":"https://api.github.com/users/pmayet/orgs","repos_url":"https://api.github.com/users/pmayet/repos","events_url":"https://api.github.com/users/pmayet/events{/privacy}","received_events_url":"https://api.github.com/users/pmayet/received_events","type":"User","site_admin":false},"created_at":"2018-12-21T18:36:46Z","updated_at":"2018-12-21T18:36:46Z","author_association":"NONE","body":"+1 @mnapoli with the trigger SQS/Lambda"}}
{"actor":{"display_login":"pmayet"}}