{"action":"opened","issue":{"url":"https://api.github.com/repos/octoberrain/cron/issues/5","labels_url":"https://api.github.com/repos/octoberrain/cron/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/octoberrain/cron/issues/5/comments","events_url":"https://api.github.com/repos/octoberrain/cron/issues/5/events","html_url":"https://github.com/octoberrain/cron/issues/5","id":55667657,"number":5,"title":"isAvailable checks for finished jobs?","user":{"login":"mradamwood","id":1739469,"avatar_url":"https://avatars.githubusercontent.com/u/1739469?v=3","gravatar_id":"","url":"https://api.github.com/users/mradamwood","html_url":"https://github.com/mradamwood","followers_url":"https://api.github.com/users/mradamwood/followers","following_url":"https://api.github.com/users/mradamwood/following{/other_user}","gists_url":"https://api.github.com/users/mradamwood/gists{/gist_id}","starred_url":"https://api.github.com/users/mradamwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mradamwood/subscriptions","organizations_url":"https://api.github.com/users/mradamwood/orgs","repos_url":"https://api.github.com/users/mradamwood/repos","events_url":"https://api.github.com/users/mradamwood/events{/privacy}","received_events_url":"https://api.github.com/users/mradamwood/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-27T20:06:38Z","updated_at":"2015-01-27T20:06:38Z","closed_at":null,"body":"Noticed that may of my queued jobs weren't being run, despite the cron running the artisan command. Seems that in scopeIsAvailable() jobs are returned if they have STATUS_OPEN OR STATUS_FINISHED. Why would you return a finished job? Shouldn't it just be as below, else you'll always return a finished job, and unfinished ones will never be first in the list to run?\r\n\r\n    public function scopeIsAvailable($query)\r\n    {\r\n        return $query\r\n            ->where('status', static::STATUS_OPEN);\r\n    }"}}