{"action":"created","comment":{"url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/comments/175750412","pull_request_review_id":105329283,"id":175750412,"diff_hunk":"@@ -264,8 +264,22 @@ def track_changes(file_tracker, output):\n         print(\"Tracking changes for file {0}\".format(file_tracker.filename), flush=True)\n     tqdm = tqdm_or_quiet(output)\n \n-    for index, line, row in tqdm(get_file_lines(file_tracker.filename, output)):\n+    # Have we seen any lines, successful or failures, from this before?\n+    prev_lines = ChangeTracker.objects.filter(file_tracker=file_tracker)\n+    prev_errors = BadLine.objects.filter(filename=file_tracker.filename)\n+\n+    last_line = 0\n+    if prev_lines.exists():\n+        last_line = prev_lines.order_by('-file_lineno')[0].file_lineno\n+    if prev_errors.exists():\n+        last_line = max(last_line, prev_errors.order_by('-line_no')[0].line_no)","path":"voter/management/commands/voter_process_snapshot.py","position":13,"original_position":13,"commit_id":"c5a51edf8bc9b6f673f5194750167fe4898af736","original_commit_id":"c5a51edf8bc9b6f673f5194750167fe4898af736","user":{"login":"vkurup","id":4413,"avatar_url":"https://avatars1.githubusercontent.com/u/4413?v=4","gravatar_id":"","url":"https://api.github.com/users/vkurup","html_url":"https://github.com/vkurup","followers_url":"https://api.github.com/users/vkurup/followers","following_url":"https://api.github.com/users/vkurup/following{/other_user}","gists_url":"https://api.github.com/users/vkurup/gists{/gist_id}","starred_url":"https://api.github.com/users/vkurup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkurup/subscriptions","organizations_url":"https://api.github.com/users/vkurup/orgs","repos_url":"https://api.github.com/users/vkurup/repos","events_url":"https://api.github.com/users/vkurup/events{/privacy}","received_events_url":"https://api.github.com/users/vkurup/received_events","type":"User","site_admin":false},"body":"same comment about using `last()`","created_at":"2018-03-20T12:43:24Z","updated_at":"2018-03-20T12:44:05Z","html_url":"https://github.com/NCVotes/voters-ingestor/pull/15#discussion_r175750412","pull_request_url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/comments/175750412"},"html":{"href":"https://github.com/NCVotes/voters-ingestor/pull/15#discussion_r175750412"},"pull_request":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15","id":176006400,"html_url":"https://github.com/NCVotes/voters-ingestor/pull/15","diff_url":"https://github.com/NCVotes/voters-ingestor/pull/15.diff","patch_url":"https://github.com/NCVotes/voters-ingestor/pull/15.patch","issue_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/15","number":15,"state":"open","locked":false,"title":"ChangeTracker and BadLine instances already track imported lines, now…","user":{"login":"ironfroggy","id":34982,"avatar_url":"https://avatars3.githubusercontent.com/u/34982?v=4","gravatar_id":"","url":"https://api.github.com/users/ironfroggy","html_url":"https://github.com/ironfroggy","followers_url":"https://api.github.com/users/ironfroggy/followers","following_url":"https://api.github.com/users/ironfroggy/following{/other_user}","gists_url":"https://api.github.com/users/ironfroggy/gists{/gist_id}","starred_url":"https://api.github.com/users/ironfroggy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ironfroggy/subscriptions","organizations_url":"https://api.github.com/users/ironfroggy/orgs","repos_url":"https://api.github.com/users/ironfroggy/repos","events_url":"https://api.github.com/users/ironfroggy/events{/privacy}","received_events_url":"https://api.github.com/users/ironfroggy/received_events","type":"User","site_admin":false},"body":"… we can skip them.","created_at":"2018-03-19T19:47:40Z","updated_at":"2018-03-20T12:44:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52d1fb7cf7da1cf91995c476cd8e07be9a43cc66","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15/commits","review_comments_url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15/comments","review_comment_url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/15/comments","statuses_url":"https://api.github.com/repos/NCVotes/voters-ingestor/statuses/c5a51edf8bc9b6f673f5194750167fe4898af736","head":{"label":"NCVotes:DIS-208-resumable-imports","ref":"DIS-208-resumable-imports","sha":"c5a51edf8bc9b6f673f5194750167fe4898af736","user":{"login":"NCVotes","id":31483865,"avatar_url":"https://avatars3.githubusercontent.com/u/31483865?v=4","gravatar_id":"","url":"https://api.github.com/users/NCVotes","html_url":"https://github.com/NCVotes","followers_url":"https://api.github.com/users/NCVotes/followers","following_url":"https://api.github.com/users/NCVotes/following{/other_user}","gists_url":"https://api.github.com/users/NCVotes/gists{/gist_id}","starred_url":"https://api.github.com/users/NCVotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCVotes/subscriptions","organizations_url":"https://api.github.com/users/NCVotes/orgs","repos_url":"https://api.github.com/users/NCVotes/repos","events_url":"https://api.github.com/users/NCVotes/events{/privacy}","received_events_url":"https://api.github.com/users/NCVotes/received_events","type":"Organization","site_admin":false},"repo":{"id":103179414,"name":"voters-ingestor","full_name":"NCVotes/voters-ingestor","owner":{"login":"NCVotes","id":31483865,"avatar_url":"https://avatars3.githubusercontent.com/u/31483865?v=4","gravatar_id":"","url":"https://api.github.com/users/NCVotes","html_url":"https://github.com/NCVotes","followers_url":"https://api.github.com/users/NCVotes/followers","following_url":"https://api.github.com/users/NCVotes/following{/other_user}","gists_url":"https://api.github.com/users/NCVotes/gists{/gist_id}","starred_url":"https://api.github.com/users/NCVotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCVotes/subscriptions","organizations_url":"https://api.github.com/users/NCVotes/orgs","repos_url":"https://api.github.com/users/NCVotes/repos","events_url":"https://api.github.com/users/NCVotes/events{/privacy}","received_events_url":"https://api.github.com/users/NCVotes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NCVotes/voters-ingestor","description":"Django app to create and configure Postgres DB, then fetch and process public voter registration and voter history files from N.C. Board of Elections","fork":false,"url":"https://api.github.com/repos/NCVotes/voters-ingestor","forks_url":"https://api.github.com/repos/NCVotes/voters-ingestor/forks","keys_url":"https://api.github.com/repos/NCVotes/voters-ingestor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NCVotes/voters-ingestor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NCVotes/voters-ingestor/teams","hooks_url":"https://api.github.com/repos/NCVotes/voters-ingestor/hooks","issue_events_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/events{/number}","events_url":"https://api.github.com/repos/NCVotes/voters-ingestor/events","assignees_url":"https://api.github.com/repos/NCVotes/voters-ingestor/assignees{/user}","branches_url":"https://api.github.com/repos/NCVotes/voters-ingestor/branches{/branch}","tags_url":"https://api.github.com/repos/NCVotes/voters-ingestor/tags","blobs_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/refs{/sha}","trees_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NCVotes/voters-ingestor/statuses/{sha}","languages_url":"https://api.github.com/repos/NCVotes/voters-ingestor/languages","stargazers_url":"https://api.github.com/repos/NCVotes/voters-ingestor/stargazers","contributors_url":"https://api.github.com/repos/NCVotes/voters-ingestor/contributors","subscribers_url":"https://api.github.com/repos/NCVotes/voters-ingestor/subscribers","subscription_url":"https://api.github.com/repos/NCVotes/voters-ingestor/subscription","commits_url":"https://api.github.com/repos/NCVotes/voters-ingestor/commits{/sha}","git_commits_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/commits{/sha}","comments_url":"https://api.github.com/repos/NCVotes/voters-ingestor/comments{/number}","issue_comment_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/comments{/number}","contents_url":"https://api.github.com/repos/NCVotes/voters-ingestor/contents/{+path}","compare_url":"https://api.github.com/repos/NCVotes/voters-ingestor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NCVotes/voters-ingestor/merges","archive_url":"https://api.github.com/repos/NCVotes/voters-ingestor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NCVotes/voters-ingestor/downloads","issues_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues{/number}","pulls_url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls{/number}","milestones_url":"https://api.github.com/repos/NCVotes/voters-ingestor/milestones{/number}","notifications_url":"https://api.github.com/repos/NCVotes/voters-ingestor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NCVotes/voters-ingestor/labels{/name}","releases_url":"https://api.github.com/repos/NCVotes/voters-ingestor/releases{/id}","deployments_url":"https://api.github.com/repos/NCVotes/voters-ingestor/deployments","created_at":"2017-09-11T19:34:55Z","updated_at":"2018-03-19T13:07:26Z","pushed_at":"2018-03-19T19:49:10Z","git_url":"git://github.com/NCVotes/voters-ingestor.git","ssh_url":"git@github.com:NCVotes/voters-ingestor.git","clone_url":"https://github.com/NCVotes/voters-ingestor.git","svn_url":"https://github.com/NCVotes/voters-ingestor","homepage":null,"size":267,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":3,"watchers":5,"default_branch":"master"}},"base":{"label":"NCVotes:master","ref":"master","sha":"ece780efedfb9801ffd593057473ebcf4922f2bb","user":{"login":"NCVotes","id":31483865,"avatar_url":"https://avatars3.githubusercontent.com/u/31483865?v=4","gravatar_id":"","url":"https://api.github.com/users/NCVotes","html_url":"https://github.com/NCVotes","followers_url":"https://api.github.com/users/NCVotes/followers","following_url":"https://api.github.com/users/NCVotes/following{/other_user}","gists_url":"https://api.github.com/users/NCVotes/gists{/gist_id}","starred_url":"https://api.github.com/users/NCVotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCVotes/subscriptions","organizations_url":"https://api.github.com/users/NCVotes/orgs","repos_url":"https://api.github.com/users/NCVotes/repos","events_url":"https://api.github.com/users/NCVotes/events{/privacy}","received_events_url":"https://api.github.com/users/NCVotes/received_events","type":"Organization","site_admin":false},"repo":{"id":103179414,"name":"voters-ingestor","full_name":"NCVotes/voters-ingestor","owner":{"login":"NCVotes","id":31483865,"avatar_url":"https://avatars3.githubusercontent.com/u/31483865?v=4","gravatar_id":"","url":"https://api.github.com/users/NCVotes","html_url":"https://github.com/NCVotes","followers_url":"https://api.github.com/users/NCVotes/followers","following_url":"https://api.github.com/users/NCVotes/following{/other_user}","gists_url":"https://api.github.com/users/NCVotes/gists{/gist_id}","starred_url":"https://api.github.com/users/NCVotes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NCVotes/subscriptions","organizations_url":"https://api.github.com/users/NCVotes/orgs","repos_url":"https://api.github.com/users/NCVotes/repos","events_url":"https://api.github.com/users/NCVotes/events{/privacy}","received_events_url":"https://api.github.com/users/NCVotes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NCVotes/voters-ingestor","description":"Django app to create and configure Postgres DB, then fetch and process public voter registration and voter history files from N.C. Board of Elections","fork":false,"url":"https://api.github.com/repos/NCVotes/voters-ingestor","forks_url":"https://api.github.com/repos/NCVotes/voters-ingestor/forks","keys_url":"https://api.github.com/repos/NCVotes/voters-ingestor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NCVotes/voters-ingestor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NCVotes/voters-ingestor/teams","hooks_url":"https://api.github.com/repos/NCVotes/voters-ingestor/hooks","issue_events_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/events{/number}","events_url":"https://api.github.com/repos/NCVotes/voters-ingestor/events","assignees_url":"https://api.github.com/repos/NCVotes/voters-ingestor/assignees{/user}","branches_url":"https://api.github.com/repos/NCVotes/voters-ingestor/branches{/branch}","tags_url":"https://api.github.com/repos/NCVotes/voters-ingestor/tags","blobs_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/refs{/sha}","trees_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NCVotes/voters-ingestor/statuses/{sha}","languages_url":"https://api.github.com/repos/NCVotes/voters-ingestor/languages","stargazers_url":"https://api.github.com/repos/NCVotes/voters-ingestor/stargazers","contributors_url":"https://api.github.com/repos/NCVotes/voters-ingestor/contributors","subscribers_url":"https://api.github.com/repos/NCVotes/voters-ingestor/subscribers","subscription_url":"https://api.github.com/repos/NCVotes/voters-ingestor/subscription","commits_url":"https://api.github.com/repos/NCVotes/voters-ingestor/commits{/sha}","git_commits_url":"https://api.github.com/repos/NCVotes/voters-ingestor/git/commits{/sha}","comments_url":"https://api.github.com/repos/NCVotes/voters-ingestor/comments{/number}","issue_comment_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/comments{/number}","contents_url":"https://api.github.com/repos/NCVotes/voters-ingestor/contents/{+path}","compare_url":"https://api.github.com/repos/NCVotes/voters-ingestor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NCVotes/voters-ingestor/merges","archive_url":"https://api.github.com/repos/NCVotes/voters-ingestor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NCVotes/voters-ingestor/downloads","issues_url":"https://api.github.com/repos/NCVotes/voters-ingestor/issues{/number}","pulls_url":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls{/number}","milestones_url":"https://api.github.com/repos/NCVotes/voters-ingestor/milestones{/number}","notifications_url":"https://api.github.com/repos/NCVotes/voters-ingestor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NCVotes/voters-ingestor/labels{/name}","releases_url":"https://api.github.com/repos/NCVotes/voters-ingestor/releases{/id}","deployments_url":"https://api.github.com/repos/NCVotes/voters-ingestor/deployments","created_at":"2017-09-11T19:34:55Z","updated_at":"2018-03-19T13:07:26Z","pushed_at":"2018-03-19T19:49:10Z","git_url":"git://github.com/NCVotes/voters-ingestor.git","ssh_url":"git@github.com:NCVotes/voters-ingestor.git","clone_url":"https://github.com/NCVotes/voters-ingestor.git","svn_url":"https://github.com/NCVotes/voters-ingestor","homepage":null,"size":267,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":3,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15"},"html":{"href":"https://github.com/NCVotes/voters-ingestor/pull/15"},"issue":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/15"},"comments":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/NCVotes/voters-ingestor/statuses/c5a51edf8bc9b6f673f5194750167fe4898af736"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"vkurup"}}