{"action":"closed","issue":{"url":"https://api.github.com/repos/laravel/framework/issues/16021","repository_url":"https://api.github.com/repos/laravel/framework","labels_url":"https://api.github.com/repos/laravel/framework/issues/16021/labels{/name}","comments_url":"https://api.github.com/repos/laravel/framework/issues/16021/comments","events_url":"https://api.github.com/repos/laravel/framework/issues/16021/events","html_url":"https://github.com/laravel/framework/issues/16021","id":184186685,"number":16021,"title":"database-backed Queue Worker does not enforce its minimum resolution of 1s","user":{"login":"shallot","id":302579,"avatar_url":"https://avatars.githubusercontent.com/u/302579?v=3","gravatar_id":"","url":"https://api.github.com/users/shallot","html_url":"https://github.com/shallot","followers_url":"https://api.github.com/users/shallot/followers","following_url":"https://api.github.com/users/shallot/following{/other_user}","gists_url":"https://api.github.com/users/shallot/gists{/gist_id}","starred_url":"https://api.github.com/users/shallot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shallot/subscriptions","organizations_url":"https://api.github.com/users/shallot/orgs","repos_url":"https://api.github.com/users/shallot/repos","events_url":"https://api.github.com/users/shallot/events{/privacy}","received_events_url":"https://api.github.com/users/shallot/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-20T10:04:04Z","updated_at":"2016-10-20T10:11:24Z","closed_at":"2016-10-20T10:11:24Z","body":"- Laravel Version: 5.2, 5.3\r\n- PHP Version: 5.5\r\n- Database Driver & Version: PostgreSQL\r\n\r\n### Description:\r\n\r\nThe queue worker has an implicit limit on its queue sleep variable in that it can't be specified in non-integer seconds.\r\n\r\ngetSeconds() calls getTimestamp(), which returns an integer, and the database table column is an integer:\r\nhttps://github.com/laravel/framework/blob/5.3/src/Illuminate/Queue/Queue.php#L144\r\nhttp://php.net/manual/en/datetime.gettimestamp.php\r\nhttps://github.com/illuminate/queue/blob/5.3/Console/stubs/jobs.stub\r\n\r\nThis is not documented at https://laravel.com/docs/5.2/queues \"Specifying Queue Sleep Duration\" - that section should say you can't go below 1.0 in this case.\r\nConfusingly enough, that whole section is missing from https://laravel.com/docs/5.3/queues\r\n\r\nFurthermore, there's another bug in 5.2 caused by this: in case the worker throws an exception, the loop code doesn't actually handle that, it just runs the generic exception handler's report method and continues with the next iteration immediately.\r\nThis bug was fixed in 5.3 by adding the configured sleep inside the method that processes a job in daemons, cf.\r\nhttps://github.com/laravel/framework/blob/5.2/src/Illuminate/Queue/Worker.php#L108\r\nhttps://github.com/laravel/framework/blob/5.3/src/Illuminate/Queue/Worker.php#L139\r\n\r\nIt would be good if this was fixed in 5.2 or at least documented in 5.2 docs, because the consequences can be serious.\r\n\r\n### Steps To Reproduce:\r\n\r\nFor example, start a queue worker with sleep 0.5 and see how it doesn't actually process jobs problem.  Or break the worker's connection to the database server, and watch storage/logs/ disk quickly fill up with an endless stream of error messages (that by default have long stack traces).\r\n\r\nPlease fix this. TIA.\r\n"}}
{"actor":{"display_login":"themsaid"}}