{"action":"created","comment":{"url":"https://api.github.com/repos/projecthydra/sufia/pulls/comments/43159776","id":43159776,"diff_hunk":"@@ -197,11 +197,15 @@ QUEUE=* rake environment resque:work\n Or, if you prefer (e.g., in production-like environments), you may want to set up a `config/resque-pool.yml` -- [here is a simple example](https://github.com/projecthydra/sufia/blob/master/sufia-models/lib/generators/sufia/models/templates/config/resque-pool.yml) -- and run resque-pool which will manage your background workers in a dedicated process.\n \n ```\n-resque-pool --daemon --environment development start\n+RUN_AT_EXIT_HOOKS=true bundle exec resque-pool --daemon --environment development start --term-graceful-wait\n ```\n \n See https://github.com/defunkt/resque for more options. If you do wind up using resque-pool, you might also be interested in a shell script to help manage it. [Here is an example](https://github.com/psu-stewardship/scholarsphere/blob/develop/script/restart_resque.sh) which you can adapt for your needs.\n \n+Due to a bug in the way that Resque terminates its job it sometimes will not give ImageMagick or other libraries a chance to clean up temporary files. RUN_AT_EXIT_HOOKS=true allows them to do so. As an alternative you can run your ownjobs to clean out temporary working directories.\n+\n+--term-graceful-wait allows workers to terminate cleanly. For more information in TERM and other signals that resque responds to see the [documentation](https://github.com/nevans/resque-pool#signals).","path":"README.md","position":null,"original_position":12,"commit_id":"5609d1eb6d04b9d72da332f35bb11c1e5c48d1e9","original_commit_id":"c8993f0d660b2733fc2590f6745cef98aa3b4f89","user":{"login":"narogers","id":1493179,"avatar_url":"https://avatars.githubusercontent.com/u/1493179?v=3","gravatar_id":"","url":"https://api.github.com/users/narogers","html_url":"https://github.com/narogers","followers_url":"https://api.github.com/users/narogers/followers","following_url":"https://api.github.com/users/narogers/following{/other_user}","gists_url":"https://api.github.com/users/narogers/gists{/gist_id}","starred_url":"https://api.github.com/users/narogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narogers/subscriptions","organizations_url":"https://api.github.com/users/narogers/orgs","repos_url":"https://api.github.com/users/narogers/repos","events_url":"https://api.github.com/users/narogers/events{/privacy}","received_events_url":"https://api.github.com/users/narogers/received_events","type":"User","site_admin":false},"body":"Updated with better phrasing","created_at":"2015-10-27T17:54:04Z","updated_at":"2015-10-27T17:54:04Z","html_url":"https://github.com/projecthydra/sufia/pull/1334#discussion_r43159776","pull_request_url":"https://api.github.com/repos/projecthydra/sufia/pulls/1334","_links":{"self":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/comments/43159776"},"html":{"href":"https://github.com/projecthydra/sufia/pull/1334#discussion_r43159776"},"pull_request":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/1334"}}},"pull_request":{"url":"https://api.github.com/repos/projecthydra/sufia/pulls/1334","id":48627331,"html_url":"https://github.com/projecthydra/sufia/pull/1334","diff_url":"https://github.com/projecthydra/sufia/pull/1334.diff","patch_url":"https://github.com/projecthydra/sufia/pull/1334.patch","issue_url":"https://api.github.com/repos/projecthydra/sufia/issues/1334","number":1334,"state":"open","locked":false,"title":"Give tips on how to use resque-pool effectively","user":{"login":"narogers","id":1493179,"avatar_url":"https://avatars.githubusercontent.com/u/1493179?v=3","gravatar_id":"","url":"https://api.github.com/users/narogers","html_url":"https://github.com/narogers","followers_url":"https://api.github.com/users/narogers/followers","following_url":"https://api.github.com/users/narogers/following{/other_user}","gists_url":"https://api.github.com/users/narogers/gists{/gist_id}","starred_url":"https://api.github.com/users/narogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narogers/subscriptions","organizations_url":"https://api.github.com/users/narogers/orgs","repos_url":"https://api.github.com/users/narogers/repos","events_url":"https://api.github.com/users/narogers/events{/privacy}","received_events_url":"https://api.github.com/users/narogers/received_events","type":"User","site_admin":false},"body":"These tips might be good to help others avoid some of the pitfalls that come with resque-pool. For anyone that wants to get a production-like environment up and running quickly they should help with two problems\r\n\r\n- Temporary files cluttering up disk space\r\n- Jobs being killed prematurely\r\n\r\nI didn't go into any details about -HUP for production deployments and rolling code reloads but if there's a good place to put it I can add more information.","created_at":"2015-10-23T20:38:50Z","updated_at":"2015-10-27T17:54:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"30a00dcc3fbaac41732bd7786a36cdf39af3f672","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/projecthydra/sufia/pulls/1334/commits","review_comments_url":"https://api.github.com/repos/projecthydra/sufia/pulls/1334/comments","review_comment_url":"https://api.github.com/repos/projecthydra/sufia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/projecthydra/sufia/issues/1334/comments","statuses_url":"https://api.github.com/repos/projecthydra/sufia/statuses/5609d1eb6d04b9d72da332f35bb11c1e5c48d1e9","head":{"label":"narogers:resque-tips","ref":"resque-tips","sha":"5609d1eb6d04b9d72da332f35bb11c1e5c48d1e9","user":{"login":"narogers","id":1493179,"avatar_url":"https://avatars.githubusercontent.com/u/1493179?v=3","gravatar_id":"","url":"https://api.github.com/users/narogers","html_url":"https://github.com/narogers","followers_url":"https://api.github.com/users/narogers/followers","following_url":"https://api.github.com/users/narogers/following{/other_user}","gists_url":"https://api.github.com/users/narogers/gists{/gist_id}","starred_url":"https://api.github.com/users/narogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narogers/subscriptions","organizations_url":"https://api.github.com/users/narogers/orgs","repos_url":"https://api.github.com/users/narogers/repos","events_url":"https://api.github.com/users/narogers/events{/privacy}","received_events_url":"https://api.github.com/users/narogers/received_events","type":"User","site_admin":false},"repo":{"id":32804993,"name":"sufia","full_name":"narogers/sufia","owner":{"login":"narogers","id":1493179,"avatar_url":"https://avatars.githubusercontent.com/u/1493179?v=3","gravatar_id":"","url":"https://api.github.com/users/narogers","html_url":"https://github.com/narogers","followers_url":"https://api.github.com/users/narogers/followers","following_url":"https://api.github.com/users/narogers/following{/other_user}","gists_url":"https://api.github.com/users/narogers/gists{/gist_id}","starred_url":"https://api.github.com/users/narogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narogers/subscriptions","organizations_url":"https://api.github.com/users/narogers/orgs","repos_url":"https://api.github.com/users/narogers/repos","events_url":"https://api.github.com/users/narogers/events{/privacy}","received_events_url":"https://api.github.com/users/narogers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/narogers/sufia","description":"Sufia is a Rails engine for creating a self-deposit institutional repository. A web application for ingest, curation, search, and display of digital assets. Powered by Hydra technologies (Rails, Hydra-head, Blacklight, Solr, Fedora Commons, etc.)","fork":true,"url":"https://api.github.com/repos/narogers/sufia","forks_url":"https://api.github.com/repos/narogers/sufia/forks","keys_url":"https://api.github.com/repos/narogers/sufia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/narogers/sufia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/narogers/sufia/teams","hooks_url":"https://api.github.com/repos/narogers/sufia/hooks","issue_events_url":"https://api.github.com/repos/narogers/sufia/issues/events{/number}","events_url":"https://api.github.com/repos/narogers/sufia/events","assignees_url":"https://api.github.com/repos/narogers/sufia/assignees{/user}","branches_url":"https://api.github.com/repos/narogers/sufia/branches{/branch}","tags_url":"https://api.github.com/repos/narogers/sufia/tags","blobs_url":"https://api.github.com/repos/narogers/sufia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/narogers/sufia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/narogers/sufia/git/refs{/sha}","trees_url":"https://api.github.com/repos/narogers/sufia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/narogers/sufia/statuses/{sha}","languages_url":"https://api.github.com/repos/narogers/sufia/languages","stargazers_url":"https://api.github.com/repos/narogers/sufia/stargazers","contributors_url":"https://api.github.com/repos/narogers/sufia/contributors","subscribers_url":"https://api.github.com/repos/narogers/sufia/subscribers","subscription_url":"https://api.github.com/repos/narogers/sufia/subscription","commits_url":"https://api.github.com/repos/narogers/sufia/commits{/sha}","git_commits_url":"https://api.github.com/repos/narogers/sufia/git/commits{/sha}","comments_url":"https://api.github.com/repos/narogers/sufia/comments{/number}","issue_comment_url":"https://api.github.com/repos/narogers/sufia/issues/comments{/number}","contents_url":"https://api.github.com/repos/narogers/sufia/contents/{+path}","compare_url":"https://api.github.com/repos/narogers/sufia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/narogers/sufia/merges","archive_url":"https://api.github.com/repos/narogers/sufia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/narogers/sufia/downloads","issues_url":"https://api.github.com/repos/narogers/sufia/issues{/number}","pulls_url":"https://api.github.com/repos/narogers/sufia/pulls{/number}","milestones_url":"https://api.github.com/repos/narogers/sufia/milestones{/number}","notifications_url":"https://api.github.com/repos/narogers/sufia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/narogers/sufia/labels{/name}","releases_url":"https://api.github.com/repos/narogers/sufia/releases{/id}","created_at":"2015-03-24T14:48:56Z","updated_at":"2015-03-24T14:48:58Z","pushed_at":"2015-10-27T17:50:49Z","git_url":"git://github.com/narogers/sufia.git","ssh_url":"git@github.com:narogers/sufia.git","clone_url":"https://github.com/narogers/sufia.git","svn_url":"https://github.com/narogers/sufia","homepage":"","size":52270,"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":"projecthydra:master","ref":"master","sha":"81d6cb8a5be4a594cd39704afa0b2246fca67516","user":{"login":"projecthydra","id":109426,"avatar_url":"https://avatars.githubusercontent.com/u/109426?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra","html_url":"https://github.com/projecthydra","followers_url":"https://api.github.com/users/projecthydra/followers","following_url":"https://api.github.com/users/projecthydra/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra/subscriptions","organizations_url":"https://api.github.com/users/projecthydra/orgs","repos_url":"https://api.github.com/users/projecthydra/repos","events_url":"https://api.github.com/users/projecthydra/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra/received_events","type":"Organization","site_admin":false},"repo":{"id":7653178,"name":"sufia","full_name":"projecthydra/sufia","owner":{"login":"projecthydra","id":109426,"avatar_url":"https://avatars.githubusercontent.com/u/109426?v=3","gravatar_id":"","url":"https://api.github.com/users/projecthydra","html_url":"https://github.com/projecthydra","followers_url":"https://api.github.com/users/projecthydra/followers","following_url":"https://api.github.com/users/projecthydra/following{/other_user}","gists_url":"https://api.github.com/users/projecthydra/gists{/gist_id}","starred_url":"https://api.github.com/users/projecthydra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/projecthydra/subscriptions","organizations_url":"https://api.github.com/users/projecthydra/orgs","repos_url":"https://api.github.com/users/projecthydra/repos","events_url":"https://api.github.com/users/projecthydra/events{/privacy}","received_events_url":"https://api.github.com/users/projecthydra/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/projecthydra/sufia","description":"Sufia is a Rails engine for creating a self-deposit institutional repository. A web application for ingest, curation, search, and display of digital assets. Powered by Hydra technologies (Rails, Hydra-head, Blacklight, Solr, Fedora Commons, etc.)","fork":false,"url":"https://api.github.com/repos/projecthydra/sufia","forks_url":"https://api.github.com/repos/projecthydra/sufia/forks","keys_url":"https://api.github.com/repos/projecthydra/sufia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/projecthydra/sufia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/projecthydra/sufia/teams","hooks_url":"https://api.github.com/repos/projecthydra/sufia/hooks","issue_events_url":"https://api.github.com/repos/projecthydra/sufia/issues/events{/number}","events_url":"https://api.github.com/repos/projecthydra/sufia/events","assignees_url":"https://api.github.com/repos/projecthydra/sufia/assignees{/user}","branches_url":"https://api.github.com/repos/projecthydra/sufia/branches{/branch}","tags_url":"https://api.github.com/repos/projecthydra/sufia/tags","blobs_url":"https://api.github.com/repos/projecthydra/sufia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/projecthydra/sufia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/projecthydra/sufia/git/refs{/sha}","trees_url":"https://api.github.com/repos/projecthydra/sufia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/projecthydra/sufia/statuses/{sha}","languages_url":"https://api.github.com/repos/projecthydra/sufia/languages","stargazers_url":"https://api.github.com/repos/projecthydra/sufia/stargazers","contributors_url":"https://api.github.com/repos/projecthydra/sufia/contributors","subscribers_url":"https://api.github.com/repos/projecthydra/sufia/subscribers","subscription_url":"https://api.github.com/repos/projecthydra/sufia/subscription","commits_url":"https://api.github.com/repos/projecthydra/sufia/commits{/sha}","git_commits_url":"https://api.github.com/repos/projecthydra/sufia/git/commits{/sha}","comments_url":"https://api.github.com/repos/projecthydra/sufia/comments{/number}","issue_comment_url":"https://api.github.com/repos/projecthydra/sufia/issues/comments{/number}","contents_url":"https://api.github.com/repos/projecthydra/sufia/contents/{+path}","compare_url":"https://api.github.com/repos/projecthydra/sufia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/projecthydra/sufia/merges","archive_url":"https://api.github.com/repos/projecthydra/sufia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/projecthydra/sufia/downloads","issues_url":"https://api.github.com/repos/projecthydra/sufia/issues{/number}","pulls_url":"https://api.github.com/repos/projecthydra/sufia/pulls{/number}","milestones_url":"https://api.github.com/repos/projecthydra/sufia/milestones{/number}","notifications_url":"https://api.github.com/repos/projecthydra/sufia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/projecthydra/sufia/labels{/name}","releases_url":"https://api.github.com/repos/projecthydra/sufia/releases{/id}","created_at":"2013-01-16T20:23:18Z","updated_at":"2015-10-25T02:20:30Z","pushed_at":"2015-10-27T17:50:50Z","git_url":"git://github.com/projecthydra/sufia.git","ssh_url":"git@github.com:projecthydra/sufia.git","clone_url":"https://github.com/projecthydra/sufia.git","svn_url":"https://github.com/projecthydra/sufia","homepage":"","size":60437,"stargazers_count":74,"watchers_count":74,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":65,"mirror_url":null,"open_issues_count":95,"forks":65,"open_issues":95,"watchers":74,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/1334"},"html":{"href":"https://github.com/projecthydra/sufia/pull/1334"},"issue":{"href":"https://api.github.com/repos/projecthydra/sufia/issues/1334"},"comments":{"href":"https://api.github.com/repos/projecthydra/sufia/issues/1334/comments"},"review_comments":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/1334/comments"},"review_comment":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/projecthydra/sufia/pulls/1334/commits"},"statuses":{"href":"https://api.github.com/repos/projecthydra/sufia/statuses/5609d1eb6d04b9d72da332f35bb11c1e5c48d1e9"}}}}