{"action":"created","issue":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/110","labels_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/110/comments","events_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/110/events","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/pull/110","id":118902914,"number":110,"title":"Fixed #26: PDF being generated from the login screen instead of tax results.","user":{"login":"johneo","id":501152,"avatar_url":"https://avatars.githubusercontent.com/u/501152?v=3","gravatar_id":"","url":"https://api.github.com/users/johneo","html_url":"https://github.com/johneo","followers_url":"https://api.github.com/users/johneo/followers","following_url":"https://api.github.com/users/johneo/following{/other_user}","gists_url":"https://api.github.com/users/johneo/gists{/gist_id}","starred_url":"https://api.github.com/users/johneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johneo/subscriptions","organizations_url":"https://api.github.com/users/johneo/orgs","repos_url":"https://api.github.com/users/johneo/repos","events_url":"https://api.github.com/users/johneo/events{/privacy}","received_events_url":"https://api.github.com/users/johneo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-25T19:06:13Z","updated_at":"2015-11-30T22:44:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/pulls/110","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/pull/110","diff_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/pull/110.diff","patch_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/pull/110.patch"},"body":"Resolves #26 @talumbau "},"comment":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/comments/160785634","html_url":"https://github.com/OpenSourcePolicyCenter/webapp-public/pull/110#issuecomment-160785634","issue_url":"https://api.github.com/repos/OpenSourcePolicyCenter/webapp-public/issues/110","id":160785634,"user":{"login":"talumbau","id":1891418,"avatar_url":"https://avatars.githubusercontent.com/u/1891418?v=3","gravatar_id":"","url":"https://api.github.com/users/talumbau","html_url":"https://github.com/talumbau","followers_url":"https://api.github.com/users/talumbau/followers","following_url":"https://api.github.com/users/talumbau/following{/other_user}","gists_url":"https://api.github.com/users/talumbau/gists{/gist_id}","starred_url":"https://api.github.com/users/talumbau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/talumbau/subscriptions","organizations_url":"https://api.github.com/users/talumbau/orgs","repos_url":"https://api.github.com/users/talumbau/repos","events_url":"https://api.github.com/users/talumbau/events{/privacy}","received_events_url":"https://api.github.com/users/talumbau/received_events","type":"User","site_admin":false},"created_at":"2015-11-30T22:44:41Z","updated_at":"2015-11-30T22:44:41Z","body":"OK, this works great for me locally, although the `pdf_view` still has the `permission_required` decorator, which I would prefer to remove. I made some commits to make this work on Heroku, then I deployed it to a test application. Here is what I found: the call to `pdfkit.from_url` (i.e. the real work) takes longer than 30 seconds on the under-powered VM that hosts the actual website. Prior to this, its only job has been to display the pages and parse the data from the worker nodes to make the output tables. It's apparently a much bigger job to create the PDF and return it. Heroku is set up to give an application error if any response takes longer than 30 seconds. So, the options to make this work are:\r\n\r\n- try a more powerful (non-free) Heroku VM for hosting the site itself) and see if any of those work\r\n- change the work pattern to be similar to the current dropq calculation: we move the PDF view over to a worker node, then poll every five seconds to see if the work is done, then pull the data down and return it.\r\n\r\nI would have to do some experiments to see if the first option works. If it does, there would be essentially no follow on work (just merging this PR for the most part) but there would be a small increase in monthly cost of the site.\r\n\r\nThe other option would require more work to refactor where the PDF is created.\r\n\r\nThis is not the highest priority this week so I'm tempted to just leave this for now. @MattHJensen, do you have thoughts on this, specifically which option you would prefer that I explore?\r\n\r\n-T.J."}}