{"action":"created","comment":{"url":"https://api.github.com/repos/square/sqeduler/pulls/comments/50741044","id":50741044,"diff_hunk":"@@ -56,6 +58,12 @@ Sqeduler::Service.start\n See documentation for [Sidekiq::Scheduler](https://github.com/Moove-it/sidekiq-scheduler#scheduled-jobs-recurring-jobs)\n for specifics on how to construct your schedule YAML file.\n \n+### Lock Maintainer\n+\n+Exclusive locks only last for the expiration you set. If your expiration is 30 seconds and the job runs for 60 seconds, you can have multiple jobs running at once. Rather than having to set absurdly high lock expirations, you can enable the `maintain_locks` option which handles this for you.\n+\n+Every 30 seconds, Sqeduler will look for any exclusive Sidekiq jobs that have been running for more than 30 seconds, and have a lock expiration of more than 30 seconds and refreshes the lock.","path":"README.md","position":17,"original_position":17,"commit_id":"d4516483bf0caf1205a82364ee85cfa826057442","original_commit_id":"d4516483bf0caf1205a82364ee85cfa826057442","user":{"login":"ggilder","id":331289,"avatar_url":"https://avatars.githubusercontent.com/u/331289?v=3","gravatar_id":"","url":"https://api.github.com/users/ggilder","html_url":"https://github.com/ggilder","followers_url":"https://api.github.com/users/ggilder/followers","following_url":"https://api.github.com/users/ggilder/following{/other_user}","gists_url":"https://api.github.com/users/ggilder/gists{/gist_id}","starred_url":"https://api.github.com/users/ggilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggilder/subscriptions","organizations_url":"https://api.github.com/users/ggilder/orgs","repos_url":"https://api.github.com/users/ggilder/repos","events_url":"https://api.github.com/users/ggilder/events{/privacy}","received_events_url":"https://api.github.com/users/ggilder/received_events","type":"User","site_admin":false},"body":"s/refreshes/refresh/\r\n\r\ngrammar nerd :stuck_out_tongue_winking_eye: ","created_at":"2016-01-25T19:16:47Z","updated_at":"2016-01-25T19:16:47Z","html_url":"https://github.com/square/sqeduler/pull/15#discussion_r50741044","pull_request_url":"https://api.github.com/repos/square/sqeduler/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/square/sqeduler/pulls/comments/50741044"},"html":{"href":"https://github.com/square/sqeduler/pull/15#discussion_r50741044"},"pull_request":{"href":"https://api.github.com/repos/square/sqeduler/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/square/sqeduler/pulls/15","id":56632841,"html_url":"https://github.com/square/sqeduler/pull/15","diff_url":"https://github.com/square/sqeduler/pull/15.diff","patch_url":"https://github.com/square/sqeduler/pull/15.patch","issue_url":"https://api.github.com/repos/square/sqeduler/issues/15","number":15,"state":"open","locked":false,"title":"Added option to refresh locks","user":{"login":"zanker","id":323517,"avatar_url":"https://avatars.githubusercontent.com/u/323517?v=3","gravatar_id":"","url":"https://api.github.com/users/zanker","html_url":"https://github.com/zanker","followers_url":"https://api.github.com/users/zanker/followers","following_url":"https://api.github.com/users/zanker/following{/other_user}","gists_url":"https://api.github.com/users/zanker/gists{/gist_id}","starred_url":"https://api.github.com/users/zanker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zanker/subscriptions","organizations_url":"https://api.github.com/users/zanker/orgs","repos_url":"https://api.github.com/users/zanker/repos","events_url":"https://api.github.com/users/zanker/events{/privacy}","received_events_url":"https://api.github.com/users/zanker/received_events","type":"User","site_admin":false},"body":"@nerdrew \r\n\r\nAs mentioned last week, this will have a thread that attempts to maintain exclusive locks if the job runs for over 30 seconds. Still need to write tests but want to check the concept first.","created_at":"2016-01-20T16:37:41Z","updated_at":"2016-01-25T19:16:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a7ddc3e658d06987fa01f6aed4ec79633d4e8e32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/square/sqeduler/pulls/15/commits","review_comments_url":"https://api.github.com/repos/square/sqeduler/pulls/15/comments","review_comment_url":"https://api.github.com/repos/square/sqeduler/pulls/comments{/number}","comments_url":"https://api.github.com/repos/square/sqeduler/issues/15/comments","statuses_url":"https://api.github.com/repos/square/sqeduler/statuses/d4516483bf0caf1205a82364ee85cfa826057442","head":{"label":"square:zanker/relocking","ref":"zanker/relocking","sha":"d4516483bf0caf1205a82364ee85cfa826057442","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":29695625,"name":"sqeduler","full_name":"square/sqeduler","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/sqeduler","description":"Provides loosely-coupled helpers for Sidekiq workers. Provides highly available scheduling across multiple hosts.","fork":false,"url":"https://api.github.com/repos/square/sqeduler","forks_url":"https://api.github.com/repos/square/sqeduler/forks","keys_url":"https://api.github.com/repos/square/sqeduler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/sqeduler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/sqeduler/teams","hooks_url":"https://api.github.com/repos/square/sqeduler/hooks","issue_events_url":"https://api.github.com/repos/square/sqeduler/issues/events{/number}","events_url":"https://api.github.com/repos/square/sqeduler/events","assignees_url":"https://api.github.com/repos/square/sqeduler/assignees{/user}","branches_url":"https://api.github.com/repos/square/sqeduler/branches{/branch}","tags_url":"https://api.github.com/repos/square/sqeduler/tags","blobs_url":"https://api.github.com/repos/square/sqeduler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/sqeduler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/sqeduler/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/sqeduler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/sqeduler/statuses/{sha}","languages_url":"https://api.github.com/repos/square/sqeduler/languages","stargazers_url":"https://api.github.com/repos/square/sqeduler/stargazers","contributors_url":"https://api.github.com/repos/square/sqeduler/contributors","subscribers_url":"https://api.github.com/repos/square/sqeduler/subscribers","subscription_url":"https://api.github.com/repos/square/sqeduler/subscription","commits_url":"https://api.github.com/repos/square/sqeduler/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/sqeduler/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/sqeduler/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/sqeduler/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/sqeduler/contents/{+path}","compare_url":"https://api.github.com/repos/square/sqeduler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/sqeduler/merges","archive_url":"https://api.github.com/repos/square/sqeduler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/sqeduler/downloads","issues_url":"https://api.github.com/repos/square/sqeduler/issues{/number}","pulls_url":"https://api.github.com/repos/square/sqeduler/pulls{/number}","milestones_url":"https://api.github.com/repos/square/sqeduler/milestones{/number}","notifications_url":"https://api.github.com/repos/square/sqeduler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/sqeduler/labels{/name}","releases_url":"https://api.github.com/repos/square/sqeduler/releases{/id}","deployments_url":"https://api.github.com/repos/square/sqeduler/deployments","created_at":"2015-01-22T19:21:04Z","updated_at":"2016-01-20T00:00:16Z","pushed_at":"2016-01-25T15:28:09Z","git_url":"git://github.com/square/sqeduler.git","ssh_url":"git@github.com:square/sqeduler.git","clone_url":"https://github.com/square/sqeduler.git","svn_url":"https://github.com/square/sqeduler","homepage":"","size":95,"stargazers_count":11,"watchers_count":11,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":11,"default_branch":"master"}},"base":{"label":"square:master","ref":"master","sha":"3c11139c9da6913695f91259ca2813eb6f49098d","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":29695625,"name":"sqeduler","full_name":"square/sqeduler","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/sqeduler","description":"Provides loosely-coupled helpers for Sidekiq workers. Provides highly available scheduling across multiple hosts.","fork":false,"url":"https://api.github.com/repos/square/sqeduler","forks_url":"https://api.github.com/repos/square/sqeduler/forks","keys_url":"https://api.github.com/repos/square/sqeduler/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/sqeduler/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/sqeduler/teams","hooks_url":"https://api.github.com/repos/square/sqeduler/hooks","issue_events_url":"https://api.github.com/repos/square/sqeduler/issues/events{/number}","events_url":"https://api.github.com/repos/square/sqeduler/events","assignees_url":"https://api.github.com/repos/square/sqeduler/assignees{/user}","branches_url":"https://api.github.com/repos/square/sqeduler/branches{/branch}","tags_url":"https://api.github.com/repos/square/sqeduler/tags","blobs_url":"https://api.github.com/repos/square/sqeduler/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/sqeduler/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/sqeduler/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/sqeduler/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/sqeduler/statuses/{sha}","languages_url":"https://api.github.com/repos/square/sqeduler/languages","stargazers_url":"https://api.github.com/repos/square/sqeduler/stargazers","contributors_url":"https://api.github.com/repos/square/sqeduler/contributors","subscribers_url":"https://api.github.com/repos/square/sqeduler/subscribers","subscription_url":"https://api.github.com/repos/square/sqeduler/subscription","commits_url":"https://api.github.com/repos/square/sqeduler/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/sqeduler/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/sqeduler/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/sqeduler/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/sqeduler/contents/{+path}","compare_url":"https://api.github.com/repos/square/sqeduler/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/sqeduler/merges","archive_url":"https://api.github.com/repos/square/sqeduler/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/sqeduler/downloads","issues_url":"https://api.github.com/repos/square/sqeduler/issues{/number}","pulls_url":"https://api.github.com/repos/square/sqeduler/pulls{/number}","milestones_url":"https://api.github.com/repos/square/sqeduler/milestones{/number}","notifications_url":"https://api.github.com/repos/square/sqeduler/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/sqeduler/labels{/name}","releases_url":"https://api.github.com/repos/square/sqeduler/releases{/id}","deployments_url":"https://api.github.com/repos/square/sqeduler/deployments","created_at":"2015-01-22T19:21:04Z","updated_at":"2016-01-20T00:00:16Z","pushed_at":"2016-01-25T15:28:09Z","git_url":"git://github.com/square/sqeduler.git","ssh_url":"git@github.com:square/sqeduler.git","clone_url":"https://github.com/square/sqeduler.git","svn_url":"https://github.com/square/sqeduler","homepage":"","size":95,"stargazers_count":11,"watchers_count":11,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":3,"forks":5,"open_issues":3,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/square/sqeduler/pulls/15"},"html":{"href":"https://github.com/square/sqeduler/pull/15"},"issue":{"href":"https://api.github.com/repos/square/sqeduler/issues/15"},"comments":{"href":"https://api.github.com/repos/square/sqeduler/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/square/sqeduler/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/square/sqeduler/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/square/sqeduler/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/square/sqeduler/statuses/d4516483bf0caf1205a82364ee85cfa826057442"}}}}