{"action":"created","comment":{"url":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/comments/44545485","id":44545485,"diff_hunk":"@@ -4,7 +4,7 @@ Gem::Specification.new do |spec|\n   spec.description    = 'Delayed_job (or DJ) encapsulates the common pattern of asynchronously executing longer tasks in the background. It is a direct extraction from Shopify where the job table is responsible for a multitude of core tasks.'\n   spec.email          = ['brian@collectiveidea.com']\n   spec.files          = %w[CHANGELOG.md CONTRIBUTING.md LICENSE.md README.md Rakefile delayed_job.gemspec]\n-  spec.files += Dir.glob('{contrib,lib,recipes,spec}/**/*')\n+  spec.files          += Dir.glob('{contrib,lib,recipes,spec}/**/*') # rubocop:disable  SpaceAroundOperators</code>","path":"delayed_job.gemspec","position":5,"original_position":5,"commit_id":"c3cc9da16659e7d1e73f9f949831dea48f46f84d","original_commit_id":"c3cc9da16659e7d1e73f9f949831dea48f46f84d","user":{"login":"sferik","id":10308,"avatar_url":"https://avatars.githubusercontent.com/u/10308?v=3","gravatar_id":"","url":"https://api.github.com/users/sferik","html_url":"https://github.com/sferik","followers_url":"https://api.github.com/users/sferik/followers","following_url":"https://api.github.com/users/sferik/following{/other_user}","gists_url":"https://api.github.com/users/sferik/gists{/gist_id}","starred_url":"https://api.github.com/users/sferik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sferik/subscriptions","organizations_url":"https://api.github.com/users/sferik/orgs","repos_url":"https://api.github.com/users/sferik/repos","events_url":"https://api.github.com/users/sferik/events{/privacy}","received_events_url":"https://api.github.com/users/sferik/received_events","type":"User","site_admin":false},"body":"Should this have `</code>` at the end?","created_at":"2015-11-11T15:38:01Z","updated_at":"2015-11-11T15:38:01Z","html_url":"https://github.com/collectiveidea/delayed_job/pull/845#discussion_r44545485","pull_request_url":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845","_links":{"self":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/comments/44545485"},"html":{"href":"https://github.com/collectiveidea/delayed_job/pull/845#discussion_r44545485"},"pull_request":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845"}}},"pull_request":{"url":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845","id":44847745,"html_url":"https://github.com/collectiveidea/delayed_job/pull/845","diff_url":"https://github.com/collectiveidea/delayed_job/pull/845.diff","patch_url":"https://github.com/collectiveidea/delayed_job/pull/845.patch","issue_url":"https://api.github.com/repos/collectiveidea/delayed_job/issues/845","number":845,"state":"open","locked":false,"title":"Queue priority in config","user":{"login":"ryannealmes","id":5302894,"avatar_url":"https://avatars.githubusercontent.com/u/5302894?v=3","gravatar_id":"","url":"https://api.github.com/users/ryannealmes","html_url":"https://github.com/ryannealmes","followers_url":"https://api.github.com/users/ryannealmes/followers","following_url":"https://api.github.com/users/ryannealmes/following{/other_user}","gists_url":"https://api.github.com/users/ryannealmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ryannealmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryannealmes/subscriptions","organizations_url":"https://api.github.com/users/ryannealmes/orgs","repos_url":"https://api.github.com/users/ryannealmes/repos","events_url":"https://api.github.com/users/ryannealmes/events{/privacy}","received_events_url":"https://api.github.com/users/ryannealmes/received_events","type":"User","site_admin":false},"body":"Queue priority is not settable via a config file. This causes complications when you want to set queue priority and leverage ActiveJob in Rails. In order to allow setting queue priority I have created a queue_attributes attribute that falls off the worker. The attribute is then accessed and the priority is set when setting up the job prior to enqueuing.\r\n\r\nI have extracted the enqueueing code into it's own class to try and clean things up a little into a `JobPreparer` for a lack of a better name.\r\n\r\nSome side notes it may be better to rather use the `queue` attribute on the worker, but I thought this was a good start.\r\n\r\nThis is my first public PR to someone else's repo. I have read the guidelines ... I am happy if it's rejected, but input on where I can improve in future or how I can change things to provide similar functionality would be much appreciated.\r\n\r\nSomeone also started a [thread](https://github.com/collectiveidea/delayed_job/issues/782) requesting this functionality.","created_at":"2015-09-12T05:55:59Z","updated_at":"2015-11-11T15:38:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03212705b2c33a232147b8142841f94c333f9e54","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845/commits","review_comments_url":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845/comments","review_comment_url":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/comments{/number}","comments_url":"https://api.github.com/repos/collectiveidea/delayed_job/issues/845/comments","statuses_url":"https://api.github.com/repos/collectiveidea/delayed_job/statuses/c3cc9da16659e7d1e73f9f949831dea48f46f84d","head":{"label":"ryannealmes:queue-priority-in-config","ref":"queue-priority-in-config","sha":"c3cc9da16659e7d1e73f9f949831dea48f46f84d","user":{"login":"ryannealmes","id":5302894,"avatar_url":"https://avatars.githubusercontent.com/u/5302894?v=3","gravatar_id":"","url":"https://api.github.com/users/ryannealmes","html_url":"https://github.com/ryannealmes","followers_url":"https://api.github.com/users/ryannealmes/followers","following_url":"https://api.github.com/users/ryannealmes/following{/other_user}","gists_url":"https://api.github.com/users/ryannealmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ryannealmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryannealmes/subscriptions","organizations_url":"https://api.github.com/users/ryannealmes/orgs","repos_url":"https://api.github.com/users/ryannealmes/repos","events_url":"https://api.github.com/users/ryannealmes/events{/privacy}","received_events_url":"https://api.github.com/users/ryannealmes/received_events","type":"User","site_admin":false},"repo":{"id":42248121,"name":"delayed_job","full_name":"ryannealmes/delayed_job","owner":{"login":"ryannealmes","id":5302894,"avatar_url":"https://avatars.githubusercontent.com/u/5302894?v=3","gravatar_id":"","url":"https://api.github.com/users/ryannealmes","html_url":"https://github.com/ryannealmes","followers_url":"https://api.github.com/users/ryannealmes/followers","following_url":"https://api.github.com/users/ryannealmes/following{/other_user}","gists_url":"https://api.github.com/users/ryannealmes/gists{/gist_id}","starred_url":"https://api.github.com/users/ryannealmes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryannealmes/subscriptions","organizations_url":"https://api.github.com/users/ryannealmes/orgs","repos_url":"https://api.github.com/users/ryannealmes/repos","events_url":"https://api.github.com/users/ryannealmes/events{/privacy}","received_events_url":"https://api.github.com/users/ryannealmes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ryannealmes/delayed_job","description":"Database based asynchronous priority queue system -- Extracted from Shopify ","fork":true,"url":"https://api.github.com/repos/ryannealmes/delayed_job","forks_url":"https://api.github.com/repos/ryannealmes/delayed_job/forks","keys_url":"https://api.github.com/repos/ryannealmes/delayed_job/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ryannealmes/delayed_job/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ryannealmes/delayed_job/teams","hooks_url":"https://api.github.com/repos/ryannealmes/delayed_job/hooks","issue_events_url":"https://api.github.com/repos/ryannealmes/delayed_job/issues/events{/number}","events_url":"https://api.github.com/repos/ryannealmes/delayed_job/events","assignees_url":"https://api.github.com/repos/ryannealmes/delayed_job/assignees{/user}","branches_url":"https://api.github.com/repos/ryannealmes/delayed_job/branches{/branch}","tags_url":"https://api.github.com/repos/ryannealmes/delayed_job/tags","blobs_url":"https://api.github.com/repos/ryannealmes/delayed_job/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ryannealmes/delayed_job/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ryannealmes/delayed_job/git/refs{/sha}","trees_url":"https://api.github.com/repos/ryannealmes/delayed_job/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ryannealmes/delayed_job/statuses/{sha}","languages_url":"https://api.github.com/repos/ryannealmes/delayed_job/languages","stargazers_url":"https://api.github.com/repos/ryannealmes/delayed_job/stargazers","contributors_url":"https://api.github.com/repos/ryannealmes/delayed_job/contributors","subscribers_url":"https://api.github.com/repos/ryannealmes/delayed_job/subscribers","subscription_url":"https://api.github.com/repos/ryannealmes/delayed_job/subscription","commits_url":"https://api.github.com/repos/ryannealmes/delayed_job/commits{/sha}","git_commits_url":"https://api.github.com/repos/ryannealmes/delayed_job/git/commits{/sha}","comments_url":"https://api.github.com/repos/ryannealmes/delayed_job/comments{/number}","issue_comment_url":"https://api.github.com/repos/ryannealmes/delayed_job/issues/comments{/number}","contents_url":"https://api.github.com/repos/ryannealmes/delayed_job/contents/{+path}","compare_url":"https://api.github.com/repos/ryannealmes/delayed_job/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ryannealmes/delayed_job/merges","archive_url":"https://api.github.com/repos/ryannealmes/delayed_job/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ryannealmes/delayed_job/downloads","issues_url":"https://api.github.com/repos/ryannealmes/delayed_job/issues{/number}","pulls_url":"https://api.github.com/repos/ryannealmes/delayed_job/pulls{/number}","milestones_url":"https://api.github.com/repos/ryannealmes/delayed_job/milestones{/number}","notifications_url":"https://api.github.com/repos/ryannealmes/delayed_job/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ryannealmes/delayed_job/labels{/name}","releases_url":"https://api.github.com/repos/ryannealmes/delayed_job/releases{/id}","created_at":"2015-09-10T14:03:38Z","updated_at":"2015-09-10T14:03:39Z","pushed_at":"2015-09-25T18:00:18Z","git_url":"git://github.com/ryannealmes/delayed_job.git","ssh_url":"git@github.com:ryannealmes/delayed_job.git","clone_url":"https://github.com/ryannealmes/delayed_job.git","svn_url":"https://github.com/ryannealmes/delayed_job","homepage":"http://groups.google.com/group/delayed_job","size":1619,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"collectiveidea:master","ref":"master","sha":"3b31ffdc08ed892526fbb244fe168e6fd050b1cd","user":{"login":"collectiveidea","id":128,"avatar_url":"https://avatars.githubusercontent.com/u/128?v=3","gravatar_id":"","url":"https://api.github.com/users/collectiveidea","html_url":"https://github.com/collectiveidea","followers_url":"https://api.github.com/users/collectiveidea/followers","following_url":"https://api.github.com/users/collectiveidea/following{/other_user}","gists_url":"https://api.github.com/users/collectiveidea/gists{/gist_id}","starred_url":"https://api.github.com/users/collectiveidea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collectiveidea/subscriptions","organizations_url":"https://api.github.com/users/collectiveidea/orgs","repos_url":"https://api.github.com/users/collectiveidea/repos","events_url":"https://api.github.com/users/collectiveidea/events{/privacy}","received_events_url":"https://api.github.com/users/collectiveidea/received_events","type":"Organization","site_admin":false},"repo":{"id":52287,"name":"delayed_job","full_name":"collectiveidea/delayed_job","owner":{"login":"collectiveidea","id":128,"avatar_url":"https://avatars.githubusercontent.com/u/128?v=3","gravatar_id":"","url":"https://api.github.com/users/collectiveidea","html_url":"https://github.com/collectiveidea","followers_url":"https://api.github.com/users/collectiveidea/followers","following_url":"https://api.github.com/users/collectiveidea/following{/other_user}","gists_url":"https://api.github.com/users/collectiveidea/gists{/gist_id}","starred_url":"https://api.github.com/users/collectiveidea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/collectiveidea/subscriptions","organizations_url":"https://api.github.com/users/collectiveidea/orgs","repos_url":"https://api.github.com/users/collectiveidea/repos","events_url":"https://api.github.com/users/collectiveidea/events{/privacy}","received_events_url":"https://api.github.com/users/collectiveidea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/collectiveidea/delayed_job","description":"Database based asynchronous priority queue system -- Extracted from Shopify ","fork":true,"url":"https://api.github.com/repos/collectiveidea/delayed_job","forks_url":"https://api.github.com/repos/collectiveidea/delayed_job/forks","keys_url":"https://api.github.com/repos/collectiveidea/delayed_job/keys{/key_id}","collaborators_url":"https://api.github.com/repos/collectiveidea/delayed_job/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/collectiveidea/delayed_job/teams","hooks_url":"https://api.github.com/repos/collectiveidea/delayed_job/hooks","issue_events_url":"https://api.github.com/repos/collectiveidea/delayed_job/issues/events{/number}","events_url":"https://api.github.com/repos/collectiveidea/delayed_job/events","assignees_url":"https://api.github.com/repos/collectiveidea/delayed_job/assignees{/user}","branches_url":"https://api.github.com/repos/collectiveidea/delayed_job/branches{/branch}","tags_url":"https://api.github.com/repos/collectiveidea/delayed_job/tags","blobs_url":"https://api.github.com/repos/collectiveidea/delayed_job/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/collectiveidea/delayed_job/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/collectiveidea/delayed_job/git/refs{/sha}","trees_url":"https://api.github.com/repos/collectiveidea/delayed_job/git/trees{/sha}","statuses_url":"https://api.github.com/repos/collectiveidea/delayed_job/statuses/{sha}","languages_url":"https://api.github.com/repos/collectiveidea/delayed_job/languages","stargazers_url":"https://api.github.com/repos/collectiveidea/delayed_job/stargazers","contributors_url":"https://api.github.com/repos/collectiveidea/delayed_job/contributors","subscribers_url":"https://api.github.com/repos/collectiveidea/delayed_job/subscribers","subscription_url":"https://api.github.com/repos/collectiveidea/delayed_job/subscription","commits_url":"https://api.github.com/repos/collectiveidea/delayed_job/commits{/sha}","git_commits_url":"https://api.github.com/repos/collectiveidea/delayed_job/git/commits{/sha}","comments_url":"https://api.github.com/repos/collectiveidea/delayed_job/comments{/number}","issue_comment_url":"https://api.github.com/repos/collectiveidea/delayed_job/issues/comments{/number}","contents_url":"https://api.github.com/repos/collectiveidea/delayed_job/contents/{+path}","compare_url":"https://api.github.com/repos/collectiveidea/delayed_job/compare/{base}...{head}","merges_url":"https://api.github.com/repos/collectiveidea/delayed_job/merges","archive_url":"https://api.github.com/repos/collectiveidea/delayed_job/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/collectiveidea/delayed_job/downloads","issues_url":"https://api.github.com/repos/collectiveidea/delayed_job/issues{/number}","pulls_url":"https://api.github.com/repos/collectiveidea/delayed_job/pulls{/number}","milestones_url":"https://api.github.com/repos/collectiveidea/delayed_job/milestones{/number}","notifications_url":"https://api.github.com/repos/collectiveidea/delayed_job/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/collectiveidea/delayed_job/labels{/name}","releases_url":"https://api.github.com/repos/collectiveidea/delayed_job/releases{/id}","created_at":"2008-09-13T14:27:37Z","updated_at":"2015-11-11T14:16:55Z","pushed_at":"2015-11-02T14:06:33Z","git_url":"git://github.com/collectiveidea/delayed_job.git","ssh_url":"git@github.com:collectiveidea/delayed_job.git","clone_url":"https://github.com/collectiveidea/delayed_job.git","svn_url":"https://github.com/collectiveidea/delayed_job","homepage":"http://groups.google.com/group/delayed_job","size":3859,"stargazers_count":3668,"watchers_count":3668,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":742,"mirror_url":null,"open_issues_count":89,"forks":742,"open_issues":89,"watchers":3668,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845"},"html":{"href":"https://github.com/collectiveidea/delayed_job/pull/845"},"issue":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/issues/845"},"comments":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/issues/845/comments"},"review_comments":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845/comments"},"review_comment":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/pulls/845/commits"},"statuses":{"href":"https://api.github.com/repos/collectiveidea/delayed_job/statuses/c3cc9da16659e7d1e73f9f949831dea48f46f84d"}}}}