{"action":"created","issue":{"url":"https://api.github.com/repos/ifjorissen/vrfy/issues/186","labels_url":"https://api.github.com/repos/ifjorissen/vrfy/issues/186/labels{/name}","comments_url":"https://api.github.com/repos/ifjorissen/vrfy/issues/186/comments","events_url":"https://api.github.com/repos/ifjorissen/vrfy/issues/186/events","html_url":"https://github.com/ifjorissen/vrfy/issues/186","id":112479206,"number":186,"title":"Polling Tango for Solutions","user":{"login":"ifjorissen","id":4051975,"avatar_url":"https://avatars.githubusercontent.com/u/4051975?v=3","gravatar_id":"","url":"https://api.github.com/users/ifjorissen","html_url":"https://github.com/ifjorissen","followers_url":"https://api.github.com/users/ifjorissen/followers","following_url":"https://api.github.com/users/ifjorissen/following{/other_user}","gists_url":"https://api.github.com/users/ifjorissen/gists{/gist_id}","starred_url":"https://api.github.com/users/ifjorissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifjorissen/subscriptions","organizations_url":"https://api.github.com/users/ifjorissen/orgs","repos_url":"https://api.github.com/users/ifjorissen/repos","events_url":"https://api.github.com/users/ifjorissen/events{/privacy}","received_events_url":"https://api.github.com/users/ifjorissen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ifjorissen/vrfy/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"ifjorissen","id":4051975,"avatar_url":"https://avatars.githubusercontent.com/u/4051975?v=3","gravatar_id":"","url":"https://api.github.com/users/ifjorissen","html_url":"https://github.com/ifjorissen","followers_url":"https://api.github.com/users/ifjorissen/followers","following_url":"https://api.github.com/users/ifjorissen/following{/other_user}","gists_url":"https://api.github.com/users/ifjorissen/gists{/gist_id}","starred_url":"https://api.github.com/users/ifjorissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifjorissen/subscriptions","organizations_url":"https://api.github.com/users/ifjorissen/orgs","repos_url":"https://api.github.com/users/ifjorissen/repos","events_url":"https://api.github.com/users/ifjorissen/events{/privacy}","received_events_url":"https://api.github.com/users/ifjorissen/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-10-20T23:17:19Z","updated_at":"2015-10-27T20:16:59Z","closed_at":null,"body":"When a user submits a solution (or when a grader / prof reassesses a solution) we poll tango consistently with a python function (see _get_problemresult in course/views.py and the reassess method in course/admin.py). This is probably a bad idea because it occupies one of our gunicorn workers (we only have ~4) during this time period. This can lead to issues where we are getting requests and the number of apache threads created by those requests outnumbers the available gunicorn workers and then we get a 503. \r\n\r\nTL;DR, we should probably do our polling on the client-side w/ javascript where we poll for a 'yes, it's ready' or 'no, not yet' response immediately (that part can be done as a python request) and then to poll again rather than to have the worker enter a function with a sleep timer. "},"comment":{"url":"https://api.github.com/repos/ifjorissen/vrfy/issues/comments/151630035","html_url":"https://github.com/ifjorissen/vrfy/issues/186#issuecomment-151630035","issue_url":"https://api.github.com/repos/ifjorissen/vrfy/issues/186","id":151630035,"user":{"login":"ifjorissen","id":4051975,"avatar_url":"https://avatars.githubusercontent.com/u/4051975?v=3","gravatar_id":"","url":"https://api.github.com/users/ifjorissen","html_url":"https://github.com/ifjorissen","followers_url":"https://api.github.com/users/ifjorissen/followers","following_url":"https://api.github.com/users/ifjorissen/following{/other_user}","gists_url":"https://api.github.com/users/ifjorissen/gists{/gist_id}","starred_url":"https://api.github.com/users/ifjorissen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ifjorissen/subscriptions","organizations_url":"https://api.github.com/users/ifjorissen/orgs","repos_url":"https://api.github.com/users/ifjorissen/repos","events_url":"https://api.github.com/users/ifjorissen/events{/privacy}","received_events_url":"https://api.github.com/users/ifjorissen/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T20:16:59Z","updated_at":"2015-10-27T20:16:59Z","body":"If we can get the job queue thing to work (w/ Celery, see #189 ) we shouldn't have as many issues polling and we'll likely have to refactor student submission and reassess and that might make this issue irrelevant "}}