{"action":"opened","number":89,"pull_request":{"url":"https://api.github.com/repos/ui/rq-scheduler/pulls/89","id":41207573,"html_url":"https://github.com/ui/rq-scheduler/pull/89","diff_url":"https://github.com/ui/rq-scheduler/pull/89.diff","patch_url":"https://github.com/ui/rq-scheduler/pull/89.patch","issue_url":"https://api.github.com/repos/ui/rq-scheduler/issues/89","number":89,"state":"open","locked":false,"title":"add options to handle stale jobs","user":{"login":"hanks","id":759107,"avatar_url":"https://avatars.githubusercontent.com/u/759107?v=3","gravatar_id":"","url":"https://api.github.com/users/hanks","html_url":"https://github.com/hanks","followers_url":"https://api.github.com/users/hanks/followers","following_url":"https://api.github.com/users/hanks/following{/other_user}","gists_url":"https://api.github.com/users/hanks/gists{/gist_id}","starred_url":"https://api.github.com/users/hanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanks/subscriptions","organizations_url":"https://api.github.com/users/hanks/orgs","repos_url":"https://api.github.com/users/hanks/repos","events_url":"https://api.github.com/users/hanks/events{/privacy}","received_events_url":"https://api.github.com/users/hanks/received_events","type":"User","site_admin":false},"body":"Here is my situation, one day the scheduler process exits unexpectedly,  and after some days, when someone found this issue, and restarted it, the scheduler checked the now time, and enqueued all the stale jobs to the working queue and were executed. But the question is some stale jobs that I do not want to execute, or I just want to execute the recently stale jobs.\r\n\r\nSo I create this pull request to check the stale jobs once when the scheduler starts, and when we find stale jobs, move them to stale queue from scheduler, and check them later.","created_at":"2015-07-30T08:06:01Z","updated_at":"2015-07-30T08:06:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ui/rq-scheduler/pulls/89/commits","review_comments_url":"https://api.github.com/repos/ui/rq-scheduler/pulls/89/comments","review_comment_url":"https://api.github.com/repos/ui/rq-scheduler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ui/rq-scheduler/issues/89/comments","statuses_url":"https://api.github.com/repos/ui/rq-scheduler/statuses/125d44bee27bcddfeafd327219822a6bb9d0a1af","head":{"label":"hanks:feature/add_option_to_handle_stale_job","ref":"feature/add_option_to_handle_stale_job","sha":"125d44bee27bcddfeafd327219822a6bb9d0a1af","user":{"login":"hanks","id":759107,"avatar_url":"https://avatars.githubusercontent.com/u/759107?v=3","gravatar_id":"","url":"https://api.github.com/users/hanks","html_url":"https://github.com/hanks","followers_url":"https://api.github.com/users/hanks/followers","following_url":"https://api.github.com/users/hanks/following{/other_user}","gists_url":"https://api.github.com/users/hanks/gists{/gist_id}","starred_url":"https://api.github.com/users/hanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanks/subscriptions","organizations_url":"https://api.github.com/users/hanks/orgs","repos_url":"https://api.github.com/users/hanks/repos","events_url":"https://api.github.com/users/hanks/events{/privacy}","received_events_url":"https://api.github.com/users/hanks/received_events","type":"User","site_admin":false},"repo":{"id":39882957,"name":"rq-scheduler","full_name":"hanks/rq-scheduler","owner":{"login":"hanks","id":759107,"avatar_url":"https://avatars.githubusercontent.com/u/759107?v=3","gravatar_id":"","url":"https://api.github.com/users/hanks","html_url":"https://github.com/hanks","followers_url":"https://api.github.com/users/hanks/followers","following_url":"https://api.github.com/users/hanks/following{/other_user}","gists_url":"https://api.github.com/users/hanks/gists{/gist_id}","starred_url":"https://api.github.com/users/hanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanks/subscriptions","organizations_url":"https://api.github.com/users/hanks/orgs","repos_url":"https://api.github.com/users/hanks/repos","events_url":"https://api.github.com/users/hanks/events{/privacy}","received_events_url":"https://api.github.com/users/hanks/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hanks/rq-scheduler","description":"A light library that adds job scheduling capabilities to RQ (Redis Queue)","fork":true,"url":"https://api.github.com/repos/hanks/rq-scheduler","forks_url":"https://api.github.com/repos/hanks/rq-scheduler/forks","keys_url":"https://api.github.com/repos/hanks/rq-scheduler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hanks/rq-scheduler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hanks/rq-scheduler/teams","hooks_url":"https://api.github.com/repos/hanks/rq-scheduler/hooks","issue_events_url":"https://api.github.com/repos/hanks/rq-scheduler/issues/events{/number}","events_url":"https://api.github.com/repos/hanks/rq-scheduler/events","assignees_url":"https://api.github.com/repos/hanks/rq-scheduler/assignees{/user}","branches_url":"https://api.github.com/repos/hanks/rq-scheduler/branches{/branch}","tags_url":"https://api.github.com/repos/hanks/rq-scheduler/tags","blobs_url":"https://api.github.com/repos/hanks/rq-scheduler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hanks/rq-scheduler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hanks/rq-scheduler/git/refs{/sha}","trees_url":"https://api.github.com/repos/hanks/rq-scheduler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hanks/rq-scheduler/statuses/{sha}","languages_url":"https://api.github.com/repos/hanks/rq-scheduler/languages","stargazers_url":"https://api.github.com/repos/hanks/rq-scheduler/stargazers","contributors_url":"https://api.github.com/repos/hanks/rq-scheduler/contributors","subscribers_url":"https://api.github.com/repos/hanks/rq-scheduler/subscribers","subscription_url":"https://api.github.com/repos/hanks/rq-scheduler/subscription","commits_url":"https://api.github.com/repos/hanks/rq-scheduler/commits{/sha}","git_commits_url":"https://api.github.com/repos/hanks/rq-scheduler/git/commits{/sha}","comments_url":"https://api.github.com/repos/hanks/rq-scheduler/comments{/number}","issue_comment_url":"https://api.github.com/repos/hanks/rq-scheduler/issues/comments{/number}","contents_url":"https://api.github.com/repos/hanks/rq-scheduler/contents/{+path}","compare_url":"https://api.github.com/repos/hanks/rq-scheduler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hanks/rq-scheduler/merges","archive_url":"https://api.github.com/repos/hanks/rq-scheduler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hanks/rq-scheduler/downloads","issues_url":"https://api.github.com/repos/hanks/rq-scheduler/issues{/number}","pulls_url":"https://api.github.com/repos/hanks/rq-scheduler/pulls{/number}","milestones_url":"https://api.github.com/repos/hanks/rq-scheduler/milestones{/number}","notifications_url":"https://api.github.com/repos/hanks/rq-scheduler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hanks/rq-scheduler/labels{/name}","releases_url":"https://api.github.com/repos/hanks/rq-scheduler/releases{/id}","created_at":"2015-07-29T08:42:00Z","updated_at":"2015-07-29T08:42:00Z","pushed_at":"2015-07-30T07:53:23Z","git_url":"git://github.com/hanks/rq-scheduler.git","ssh_url":"git@github.com:hanks/rq-scheduler.git","clone_url":"https://github.com/hanks/rq-scheduler.git","svn_url":"https://github.com/hanks/rq-scheduler","homepage":"","size":738,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ui:master","ref":"master","sha":"8583d6f5c660bb720c902225922415b30d7248f8","user":{"login":"ui","id":210428,"avatar_url":"https://avatars.githubusercontent.com/u/210428?v=3","gravatar_id":"","url":"https://api.github.com/users/ui","html_url":"https://github.com/ui","followers_url":"https://api.github.com/users/ui/followers","following_url":"https://api.github.com/users/ui/following{/other_user}","gists_url":"https://api.github.com/users/ui/gists{/gist_id}","starred_url":"https://api.github.com/users/ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ui/subscriptions","organizations_url":"https://api.github.com/users/ui/orgs","repos_url":"https://api.github.com/users/ui/repos","events_url":"https://api.github.com/users/ui/events{/privacy}","received_events_url":"https://api.github.com/users/ui/received_events","type":"User","site_admin":false},"repo":{"id":4674035,"name":"rq-scheduler","full_name":"ui/rq-scheduler","owner":{"login":"ui","id":210428,"avatar_url":"https://avatars.githubusercontent.com/u/210428?v=3","gravatar_id":"","url":"https://api.github.com/users/ui","html_url":"https://github.com/ui","followers_url":"https://api.github.com/users/ui/followers","following_url":"https://api.github.com/users/ui/following{/other_user}","gists_url":"https://api.github.com/users/ui/gists{/gist_id}","starred_url":"https://api.github.com/users/ui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ui/subscriptions","organizations_url":"https://api.github.com/users/ui/orgs","repos_url":"https://api.github.com/users/ui/repos","events_url":"https://api.github.com/users/ui/events{/privacy}","received_events_url":"https://api.github.com/users/ui/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ui/rq-scheduler","description":"A light library that adds job scheduling capabilities to RQ (Redis Queue)","fork":false,"url":"https://api.github.com/repos/ui/rq-scheduler","forks_url":"https://api.github.com/repos/ui/rq-scheduler/forks","keys_url":"https://api.github.com/repos/ui/rq-scheduler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ui/rq-scheduler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ui/rq-scheduler/teams","hooks_url":"https://api.github.com/repos/ui/rq-scheduler/hooks","issue_events_url":"https://api.github.com/repos/ui/rq-scheduler/issues/events{/number}","events_url":"https://api.github.com/repos/ui/rq-scheduler/events","assignees_url":"https://api.github.com/repos/ui/rq-scheduler/assignees{/user}","branches_url":"https://api.github.com/repos/ui/rq-scheduler/branches{/branch}","tags_url":"https://api.github.com/repos/ui/rq-scheduler/tags","blobs_url":"https://api.github.com/repos/ui/rq-scheduler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ui/rq-scheduler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ui/rq-scheduler/git/refs{/sha}","trees_url":"https://api.github.com/repos/ui/rq-scheduler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ui/rq-scheduler/statuses/{sha}","languages_url":"https://api.github.com/repos/ui/rq-scheduler/languages","stargazers_url":"https://api.github.com/repos/ui/rq-scheduler/stargazers","contributors_url":"https://api.github.com/repos/ui/rq-scheduler/contributors","subscribers_url":"https://api.github.com/repos/ui/rq-scheduler/subscribers","subscription_url":"https://api.github.com/repos/ui/rq-scheduler/subscription","commits_url":"https://api.github.com/repos/ui/rq-scheduler/commits{/sha}","git_commits_url":"https://api.github.com/repos/ui/rq-scheduler/git/commits{/sha}","comments_url":"https://api.github.com/repos/ui/rq-scheduler/comments{/number}","issue_comment_url":"https://api.github.com/repos/ui/rq-scheduler/issues/comments{/number}","contents_url":"https://api.github.com/repos/ui/rq-scheduler/contents/{+path}","compare_url":"https://api.github.com/repos/ui/rq-scheduler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ui/rq-scheduler/merges","archive_url":"https://api.github.com/repos/ui/rq-scheduler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ui/rq-scheduler/downloads","issues_url":"https://api.github.com/repos/ui/rq-scheduler/issues{/number}","pulls_url":"https://api.github.com/repos/ui/rq-scheduler/pulls{/number}","milestones_url":"https://api.github.com/repos/ui/rq-scheduler/milestones{/number}","notifications_url":"https://api.github.com/repos/ui/rq-scheduler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ui/rq-scheduler/labels{/name}","releases_url":"https://api.github.com/repos/ui/rq-scheduler/releases{/id}","created_at":"2012-06-15T10:45:48Z","updated_at":"2015-07-29T08:36:06Z","pushed_at":"2015-07-29T12:52:13Z","git_url":"git://github.com/ui/rq-scheduler.git","ssh_url":"git@github.com:ui/rq-scheduler.git","clone_url":"https://github.com/ui/rq-scheduler.git","svn_url":"https://github.com/ui/rq-scheduler","homepage":"","size":738,"stargazers_count":286,"watchers_count":286,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"open_issues_count":21,"forks":61,"open_issues":21,"watchers":286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ui/rq-scheduler/pulls/89"},"html":{"href":"https://github.com/ui/rq-scheduler/pull/89"},"issue":{"href":"https://api.github.com/repos/ui/rq-scheduler/issues/89"},"comments":{"href":"https://api.github.com/repos/ui/rq-scheduler/issues/89/comments"},"review_comments":{"href":"https://api.github.com/repos/ui/rq-scheduler/pulls/89/comments"},"review_comment":{"href":"https://api.github.com/repos/ui/rq-scheduler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ui/rq-scheduler/pulls/89/commits"},"statuses":{"href":"https://api.github.com/repos/ui/rq-scheduler/statuses/125d44bee27bcddfeafd327219822a6bb9d0a1af"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":5,"additions":139,"deletions":7,"changed_files":3}}