{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/rummager/pulls/comments/156928041","pull_request_review_id":83482711,"id":156928041,"diff_hunk":"@@ -56,17 +48,48 @@ def process_action(actions, routing_key, payload)\n       else\n         logger.info(\"#{routing_key} -> SKIPPED #{presenter.base_path} #{presenter.type}\")\n       end\n+\n+    # Rescuing as we don't want to retry this class of error\n+    rescue MissingBasePath => e\n+      return if DOCUMENT_TYPES_WITHOUT_BASE_PATH.include?(payload[\"document_type\"])\n+      GovukError.notify(e, extra: { message_body: payload })\n+        # Unpublishing messages for something that does not exist may have been\n+        # processed out of order so we don't want to notify errbit but just allow\n+        # the process to continue\n+    rescue NotFoundError\n+      logger.info(\"#{payload['base_path']} could not be found.\")\n+      Services.statsd_client.increment('govuk_index.not-found-error')\n+    rescue UnknownDocumentTypeError\n+      logger.info(\"#{payload['document_type']} document type is not known.\")\n+      Services.statsd_client.increment('govuk_index.unknown-document-type')\n     end\n \n-    def process_response(response)\n-      # we are only expecting to process a single message at a time\n-      if response['items'].count > 1\n-        Services.statsd_client.increment('govuk_index.elasticsearch.multiple_responses')\n-        raise MultipleMessagesInElasticsearchResponse\n+    def process_responses(responses, messages)\n+      messages_with_error = []\n+\n+      responses['items'].zip(messages).each do |response, message|","path":"lib/govuk_index/publishing_event_worker.rb","position":61,"original_position":61,"commit_id":"2a5b0ab21a717cbbbb2c442589b54bfc5667258d","original_commit_id":"2a5b0ab21a717cbbbb2c442589b54bfc5667258d","user":{"login":"MatMoore","id":87579,"avatar_url":"https://avatars1.githubusercontent.com/u/87579?v=4","gravatar_id":"","url":"https://api.github.com/users/MatMoore","html_url":"https://github.com/MatMoore","followers_url":"https://api.github.com/users/MatMoore/followers","following_url":"https://api.github.com/users/MatMoore/following{/other_user}","gists_url":"https://api.github.com/users/MatMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/MatMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatMoore/subscriptions","organizations_url":"https://api.github.com/users/MatMoore/orgs","repos_url":"https://api.github.com/users/MatMoore/repos","events_url":"https://api.github.com/users/MatMoore/events{/privacy}","received_events_url":"https://api.github.com/users/MatMoore/received_events","type":"User","site_admin":false},"body":"is the items array guaranteed to be in the same order as the request?","created_at":"2017-12-14T12:15:19Z","updated_at":"2017-12-14T12:29:03Z","html_url":"https://github.com/alphagov/rummager/pull/1080#discussion_r156928041","pull_request_url":"https://api.github.com/repos/alphagov/rummager/pulls/1080","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/comments/156928041"},"html":{"href":"https://github.com/alphagov/rummager/pull/1080#discussion_r156928041"},"pull_request":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/1080"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/rummager/pulls/1080","id":158082786,"html_url":"https://github.com/alphagov/rummager/pull/1080","diff_url":"https://github.com/alphagov/rummager/pull/1080.diff","patch_url":"https://github.com/alphagov/rummager/pull/1080.patch","issue_url":"https://api.github.com/repos/alphagov/rummager/issues/1080","number":1080,"state":"open","locked":false,"title":"Process message batches","user":{"login":"dwhenry","id":63736,"avatar_url":"https://avatars3.githubusercontent.com/u/63736?v=4","gravatar_id":"","url":"https://api.github.com/users/dwhenry","html_url":"https://github.com/dwhenry","followers_url":"https://api.github.com/users/dwhenry/followers","following_url":"https://api.github.com/users/dwhenry/following{/other_user}","gists_url":"https://api.github.com/users/dwhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhenry/subscriptions","organizations_url":"https://api.github.com/users/dwhenry/orgs","repos_url":"https://api.github.com/users/dwhenry/repos","events_url":"https://api.github.com/users/dwhenry/events{/privacy}","received_events_url":"https://api.github.com/users/dwhenry/received_events","type":"User","site_admin":false},"body":"This is the first step to enabling the processing of batches from rabbit mq.\r\nThe idea is that this should increase the throughput speed when large volumes\r\nof data are republished.\r\n\r\nThe code works by checking which of the events sent across succeed, and\r\nmanually resending any that failed. Unfortunately this means the sidekiq retry\r\ncount is reset whenever more than one item in the batch is successful, however\r\nthis is considered an acceptable compromise at this stage.\r\n\r\nThis code is designed to work in coordination with: alphagov/govuk_message_queue_consumer#47","created_at":"2017-12-13T12:39:22Z","updated_at":"2017-12-14T12:29:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"addf965f59f88c338541f6c9e781a76ab3b15b7d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/rummager/pulls/1080/commits","review_comments_url":"https://api.github.com/repos/alphagov/rummager/pulls/1080/comments","review_comment_url":"https://api.github.com/repos/alphagov/rummager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/rummager/issues/1080/comments","statuses_url":"https://api.github.com/repos/alphagov/rummager/statuses/2a5b0ab21a717cbbbb2c442589b54bfc5667258d","head":{"label":"alphagov:process-message-batches","ref":"process-message-batches","sha":"2a5b0ab21a717cbbbb2c442589b54bfc5667258d","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2686767,"name":"rummager","full_name":"alphagov/rummager","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/rummager","description":"Search API for GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/rummager","forks_url":"https://api.github.com/repos/alphagov/rummager/forks","keys_url":"https://api.github.com/repos/alphagov/rummager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/rummager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/rummager/teams","hooks_url":"https://api.github.com/repos/alphagov/rummager/hooks","issue_events_url":"https://api.github.com/repos/alphagov/rummager/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/rummager/events","assignees_url":"https://api.github.com/repos/alphagov/rummager/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/rummager/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/rummager/tags","blobs_url":"https://api.github.com/repos/alphagov/rummager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/rummager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/rummager/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/rummager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/rummager/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/rummager/languages","stargazers_url":"https://api.github.com/repos/alphagov/rummager/stargazers","contributors_url":"https://api.github.com/repos/alphagov/rummager/contributors","subscribers_url":"https://api.github.com/repos/alphagov/rummager/subscribers","subscription_url":"https://api.github.com/repos/alphagov/rummager/subscription","commits_url":"https://api.github.com/repos/alphagov/rummager/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/rummager/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/rummager/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/rummager/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/rummager/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/rummager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/rummager/merges","archive_url":"https://api.github.com/repos/alphagov/rummager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/rummager/downloads","issues_url":"https://api.github.com/repos/alphagov/rummager/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/rummager/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/rummager/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/rummager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/rummager/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/rummager/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/rummager/deployments","created_at":"2011-11-01T10:12:45Z","updated_at":"2017-11-13T22:21:32Z","pushed_at":"2017-12-14T12:04:52Z","git_url":"git://github.com/alphagov/rummager.git","ssh_url":"git@github.com:alphagov/rummager.git","clone_url":"https://github.com/alphagov/rummager.git","svn_url":"https://github.com/alphagov/rummager","homepage":"https://docs.publishing.service.gov.uk/apps/rummager.html","size":5320,"stargazers_count":35,"watchers_count":35,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":10,"open_issues":7,"watchers":35,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"9d98f1da3c0adf755b7ffe20ba0e077286eaef20","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2686767,"name":"rummager","full_name":"alphagov/rummager","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/rummager","description":"Search API for GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/rummager","forks_url":"https://api.github.com/repos/alphagov/rummager/forks","keys_url":"https://api.github.com/repos/alphagov/rummager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/rummager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/rummager/teams","hooks_url":"https://api.github.com/repos/alphagov/rummager/hooks","issue_events_url":"https://api.github.com/repos/alphagov/rummager/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/rummager/events","assignees_url":"https://api.github.com/repos/alphagov/rummager/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/rummager/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/rummager/tags","blobs_url":"https://api.github.com/repos/alphagov/rummager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/rummager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/rummager/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/rummager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/rummager/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/rummager/languages","stargazers_url":"https://api.github.com/repos/alphagov/rummager/stargazers","contributors_url":"https://api.github.com/repos/alphagov/rummager/contributors","subscribers_url":"https://api.github.com/repos/alphagov/rummager/subscribers","subscription_url":"https://api.github.com/repos/alphagov/rummager/subscription","commits_url":"https://api.github.com/repos/alphagov/rummager/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/rummager/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/rummager/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/rummager/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/rummager/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/rummager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/rummager/merges","archive_url":"https://api.github.com/repos/alphagov/rummager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/rummager/downloads","issues_url":"https://api.github.com/repos/alphagov/rummager/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/rummager/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/rummager/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/rummager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/rummager/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/rummager/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/rummager/deployments","created_at":"2011-11-01T10:12:45Z","updated_at":"2017-11-13T22:21:32Z","pushed_at":"2017-12-14T12:04:52Z","git_url":"git://github.com/alphagov/rummager.git","ssh_url":"git@github.com:alphagov/rummager.git","clone_url":"https://github.com/alphagov/rummager.git","svn_url":"https://github.com/alphagov/rummager","homepage":"https://docs.publishing.service.gov.uk/apps/rummager.html","size":5320,"stargazers_count":35,"watchers_count":35,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":10,"open_issues":7,"watchers":35,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/1080"},"html":{"href":"https://github.com/alphagov/rummager/pull/1080"},"issue":{"href":"https://api.github.com/repos/alphagov/rummager/issues/1080"},"comments":{"href":"https://api.github.com/repos/alphagov/rummager/issues/1080/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/1080/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/1080/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/rummager/statuses/2a5b0ab21a717cbbbb2c442589b54bfc5667258d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"MatMoore"}}