{"action":"created","comment":{"url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/comments/131076965","pull_request_review_id":54019922,"id":131076965,"diff_hunk":"@@ -15,7 +15,10 @@ module.exports = CompileController =\n \t\t\tProjectPersistenceManager.markProjectAsJustAccessed request.project_id, (error) ->\n \t\t\t\treturn next(error) if error?\n \t\t\t\tCompileManager.doCompile request, (error, outputFiles = []) ->\n-\t\t\t\t\tif error?.terminated\n+\t\t\t\t\tif error?.message is \"invalid state\"","path":"app/coffee/CompileController.coffee","position":5,"original_position":5,"commit_id":"7e1d3d98e701eca3ea6ab507ed22c7c9f93d04bc","original_commit_id":"7e1d3d98e701eca3ea6ab507ed22c7c9f93d04bc","user":{"login":"jpallen","id":31305,"avatar_url":"https://avatars0.githubusercontent.com/u/31305?v=4","gravatar_id":"","url":"https://api.github.com/users/jpallen","html_url":"https://github.com/jpallen","followers_url":"https://api.github.com/users/jpallen/followers","following_url":"https://api.github.com/users/jpallen/following{/other_user}","gists_url":"https://api.github.com/users/jpallen/gists{/gist_id}","starred_url":"https://api.github.com/users/jpallen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpallen/subscriptions","organizations_url":"https://api.github.com/users/jpallen/orgs","repos_url":"https://api.github.com/users/jpallen/repos","events_url":"https://api.github.com/users/jpallen/events{/privacy}","received_events_url":"https://api.github.com/users/jpallen/received_events","type":"User","site_admin":false},"body":"Can we create a new subclass of Error here, and do an `error instanceof InvalidStateError` check instead? That's a pattern I've been trying to push for when handling certain error cases, see e.g. https://github.com/sharelatex/web-sharelatex/blob/master/app/coffee/Features/Errors/Errors.coffee\r\n\r\nAlso, can we be a bit more descriptive than `InvalidState`? What about something like `FilesOutOfSync`?","created_at":"2017-08-03T08:05:59Z","updated_at":"2017-08-03T08:05:59Z","html_url":"https://github.com/sharelatex/clsi-sharelatex/pull/66#discussion_r131076965","pull_request_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/comments/131076965"},"html":{"href":"https://github.com/sharelatex/clsi-sharelatex/pull/66#discussion_r131076965"},"pull_request":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66","id":133700068,"html_url":"https://github.com/sharelatex/clsi-sharelatex/pull/66","diff_url":"https://github.com/sharelatex/clsi-sharelatex/pull/66.diff","patch_url":"https://github.com/sharelatex/clsi-sharelatex/pull/66.patch","issue_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/66","number":66,"state":"open","locked":false,"title":"write files incrementally (wip)","user":{"login":"briangough","id":7457354,"avatar_url":"https://avatars2.githubusercontent.com/u/7457354?v=4","gravatar_id":"","url":"https://api.github.com/users/briangough","html_url":"https://github.com/briangough","followers_url":"https://api.github.com/users/briangough/followers","following_url":"https://api.github.com/users/briangough/following{/other_user}","gists_url":"https://api.github.com/users/briangough/gists{/gist_id}","starred_url":"https://api.github.com/users/briangough/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/briangough/subscriptions","organizations_url":"https://api.github.com/users/briangough/orgs","repos_url":"https://api.github.com/users/briangough/repos","events_url":"https://api.github.com/users/briangough/events{/privacy}","received_events_url":"https://api.github.com/users/briangough/received_events","type":"User","site_admin":false},"body":"if request has an option incremental:<state-id> and the <state-id> matches the value from the last full compile, then write the content in the request incrementally into the compile directory.\r\n\r\nif the request has an option state:<state-id> it is a full compile and the state id is written into the compile directory in the file .resource-state\r\n\r\nif the state-id on an incremental compile doesn't match the value in the .resource-state file, return a response of 409 (Conflict).","created_at":"2017-08-02T12:50:34Z","updated_at":"2017-08-03T08:05:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"35d50543e337672d55e03745cedb762000aa2720","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66/commits","review_comments_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66/comments","review_comment_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/66/comments","statuses_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/statuses/7e1d3d98e701eca3ea6ab507ed22c7c9f93d04bc","head":{"label":"sharelatex:bg-compile-from-redis","ref":"bg-compile-from-redis","sha":"7e1d3d98e701eca3ea6ab507ed22c7c9f93d04bc","user":{"login":"sharelatex","id":3009289,"avatar_url":"https://avatars0.githubusercontent.com/u/3009289?v=4","gravatar_id":"","url":"https://api.github.com/users/sharelatex","html_url":"https://github.com/sharelatex","followers_url":"https://api.github.com/users/sharelatex/followers","following_url":"https://api.github.com/users/sharelatex/following{/other_user}","gists_url":"https://api.github.com/users/sharelatex/gists{/gist_id}","starred_url":"https://api.github.com/users/sharelatex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharelatex/subscriptions","organizations_url":"https://api.github.com/users/sharelatex/orgs","repos_url":"https://api.github.com/users/sharelatex/repos","events_url":"https://api.github.com/users/sharelatex/events{/privacy}","received_events_url":"https://api.github.com/users/sharelatex/received_events","type":"Organization","site_admin":false},"repo":{"id":16775434,"name":"clsi-sharelatex","full_name":"sharelatex/clsi-sharelatex","owner":{"login":"sharelatex","id":3009289,"avatar_url":"https://avatars0.githubusercontent.com/u/3009289?v=4","gravatar_id":"","url":"https://api.github.com/users/sharelatex","html_url":"https://github.com/sharelatex","followers_url":"https://api.github.com/users/sharelatex/followers","following_url":"https://api.github.com/users/sharelatex/following{/other_user}","gists_url":"https://api.github.com/users/sharelatex/gists{/gist_id}","starred_url":"https://api.github.com/users/sharelatex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharelatex/subscriptions","organizations_url":"https://api.github.com/users/sharelatex/orgs","repos_url":"https://api.github.com/users/sharelatex/repos","events_url":"https://api.github.com/users/sharelatex/events{/privacy}","received_events_url":"https://api.github.com/users/sharelatex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharelatex/clsi-sharelatex","description":"A web api for compiling LaTeX documents in the cloud","fork":false,"url":"https://api.github.com/repos/sharelatex/clsi-sharelatex","forks_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/forks","keys_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/teams","hooks_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/hooks","issue_events_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/events{/number}","events_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/events","assignees_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/assignees{/user}","branches_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/branches{/branch}","tags_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/tags","blobs_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/statuses/{sha}","languages_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/languages","stargazers_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/stargazers","contributors_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/contributors","subscribers_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/subscribers","subscription_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/subscription","commits_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/contents/{+path}","compare_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/merges","archive_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/downloads","issues_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues{/number}","pulls_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls{/number}","milestones_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/milestones{/number}","notifications_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/labels{/name}","releases_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/releases{/id}","deployments_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/deployments","created_at":"2014-02-12T17:29:04Z","updated_at":"2017-07-21T17:36:03Z","pushed_at":"2017-08-02T12:50:34Z","git_url":"git://github.com/sharelatex/clsi-sharelatex.git","ssh_url":"git@github.com:sharelatex/clsi-sharelatex.git","clone_url":"https://github.com/sharelatex/clsi-sharelatex.git","svn_url":"https://github.com/sharelatex/clsi-sharelatex","homepage":null,"size":2120,"stargazers_count":65,"watchers_count":65,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":18,"forks":38,"open_issues":18,"watchers":65,"default_branch":"master"}},"base":{"label":"sharelatex:master","ref":"master","sha":"d5e0ab5a6f2e92eb0be1d665a5f90f8f7fbf2116","user":{"login":"sharelatex","id":3009289,"avatar_url":"https://avatars0.githubusercontent.com/u/3009289?v=4","gravatar_id":"","url":"https://api.github.com/users/sharelatex","html_url":"https://github.com/sharelatex","followers_url":"https://api.github.com/users/sharelatex/followers","following_url":"https://api.github.com/users/sharelatex/following{/other_user}","gists_url":"https://api.github.com/users/sharelatex/gists{/gist_id}","starred_url":"https://api.github.com/users/sharelatex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharelatex/subscriptions","organizations_url":"https://api.github.com/users/sharelatex/orgs","repos_url":"https://api.github.com/users/sharelatex/repos","events_url":"https://api.github.com/users/sharelatex/events{/privacy}","received_events_url":"https://api.github.com/users/sharelatex/received_events","type":"Organization","site_admin":false},"repo":{"id":16775434,"name":"clsi-sharelatex","full_name":"sharelatex/clsi-sharelatex","owner":{"login":"sharelatex","id":3009289,"avatar_url":"https://avatars0.githubusercontent.com/u/3009289?v=4","gravatar_id":"","url":"https://api.github.com/users/sharelatex","html_url":"https://github.com/sharelatex","followers_url":"https://api.github.com/users/sharelatex/followers","following_url":"https://api.github.com/users/sharelatex/following{/other_user}","gists_url":"https://api.github.com/users/sharelatex/gists{/gist_id}","starred_url":"https://api.github.com/users/sharelatex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sharelatex/subscriptions","organizations_url":"https://api.github.com/users/sharelatex/orgs","repos_url":"https://api.github.com/users/sharelatex/repos","events_url":"https://api.github.com/users/sharelatex/events{/privacy}","received_events_url":"https://api.github.com/users/sharelatex/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sharelatex/clsi-sharelatex","description":"A web api for compiling LaTeX documents in the cloud","fork":false,"url":"https://api.github.com/repos/sharelatex/clsi-sharelatex","forks_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/forks","keys_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/teams","hooks_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/hooks","issue_events_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/events{/number}","events_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/events","assignees_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/assignees{/user}","branches_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/branches{/branch}","tags_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/tags","blobs_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/refs{/sha}","trees_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/statuses/{sha}","languages_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/languages","stargazers_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/stargazers","contributors_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/contributors","subscribers_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/subscribers","subscription_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/subscription","commits_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/commits{/sha}","git_commits_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/git/commits{/sha}","comments_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/comments{/number}","issue_comment_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/comments{/number}","contents_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/contents/{+path}","compare_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/merges","archive_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/downloads","issues_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues{/number}","pulls_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls{/number}","milestones_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/milestones{/number}","notifications_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/labels{/name}","releases_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/releases{/id}","deployments_url":"https://api.github.com/repos/sharelatex/clsi-sharelatex/deployments","created_at":"2014-02-12T17:29:04Z","updated_at":"2017-07-21T17:36:03Z","pushed_at":"2017-08-02T12:50:34Z","git_url":"git://github.com/sharelatex/clsi-sharelatex.git","ssh_url":"git@github.com:sharelatex/clsi-sharelatex.git","clone_url":"https://github.com/sharelatex/clsi-sharelatex.git","svn_url":"https://github.com/sharelatex/clsi-sharelatex","homepage":null,"size":2120,"stargazers_count":65,"watchers_count":65,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":18,"forks":38,"open_issues":18,"watchers":65,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66"},"html":{"href":"https://github.com/sharelatex/clsi-sharelatex/pull/66"},"issue":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/66"},"comments":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/sharelatex/clsi-sharelatex/statuses/7e1d3d98e701eca3ea6ab507ed22c7c9f93d04bc"}}}}
{"actor":{"display_login":"jpallen"}}