{"action":"created","comment":{"url":"https://api.github.com/repos/kogai/kindlized/pulls/comments/41812461","id":41812461,"diff_hunk":"@@ -8,96 +8,96 @@ const Book = require('common/Book')()\n const Utils = require('common/Utils')()\n \n class SendStatus{\n-\tconstructor(){\n-\t\tthis.conditions = {\n-\t\t\tRepairImg: {\n-\t\t\t\t$and: [\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$or: [\n-\t\t\t\t\t\t\t{ images: null },\n-\t\t\t\t\t\t\t{ images: { $exists: false } },\n-\t\t\t\t\t\t\t{ $where: \"this.images == 0\" }\n-\t\t\t\t\t\t]\n-\t\t\t\t\t},\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$or: [\n-\t\t\t\t\t\t\t{ \"modifiedLog.RepairImgAt\": { $exists: false } },\n-\t\t\t\t\t\t\t{ \"modifiedLog.RepairImgAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n-\t\t\t\t\t\t]\n-\t\t\t\t\t}\n-\t\t\t\t]\n-\t\t\t},\n-\t\t\tInspectKindlize: {\n-\t\t\t\t$and: [\n-\t\t\t\t\t{ AuthorityASIN: { $exists: true } },\n-\t\t\t\t\t{ AuthorityASIN: { $ne: [''] } },\n-\t\t\t\t\t{ AuthorityASIN: { $ne: null } },\n-\t\t\t\t\t{ isKindlized: false },\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$or: [\n-\t\t\t\t\t\t\t{ \"modifiedLog.InspectKindlizeAt\": { $exists: false } },\n-\t\t\t\t\t\t\t{ \"modifiedLog.InspectKindlizeAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n-\t\t\t\t\t\t]\n-\t\t\t\t\t}\n-\t\t\t\t]\n-\t\t\t},\n-\t\t\tAddASIN: {\n-\t\t\t\t$and: [\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$or: [\n-\t\t\t\t\t\t\t{ AuthorityASIN: { $exists: false } },\n-\t\t\t\t\t\t\t{ AuthorityASIN: [''] },\n-\t\t\t\t\t\t\t{ AuthorityASIN: undefined },\n-\t\t\t\t\t\t\t{ AuthorityASIN: 'UNDEFINED' },\n-\t\t\t\t\t\t\t{ AuthorityASIN: ['UNDEFINED'] }\n-\t\t\t\t\t\t]\n-\t\t\t\t\t},\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$or: [\n-\t\t\t\t\t\t\t{ \"modifiedLog.AddASINAt\": { $exists: false } },\n-\t\t\t\t\t\t\t{ \"modifiedLog.AddASINAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n-\t\t\t\t\t\t]\n-\t\t\t\t\t}\n-\t\t\t\t]\n-\t\t\t},\n-\t\t\tUpdateUrl: {\n-\t\t\t\t$and: [\n-\t\t\t\t  { isKindlized: true },\n-\t\t\t\t  { isKindlizedUrl: { $ne: true } },\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$or: [\n-\t\t\t\t\t\t\t{ \"modifiedLog.UpdateUrlAt\": { $exists: false } },\n-\t\t\t\t\t\t\t{ \"modifiedLog.UpdateUrlAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n-\t\t\t\t\t\t]\n-\t\t\t\t\t}\n-\t\t\t\t]\n-\t\t\t}\n-\t\t}\n-\t}\n+  constructor(){\n+    this.conditions = {\n+      RepairImg: {\n+        $and: [\n+          {\n+            $or: [\n+              { images: null },\n+              { images: { $exists: false } },\n+              { $where: \"this.images == 0\" }\n+            ]\n+          },\n+          {\n+            $or: [\n+              { \"modifiedLog.RepairImgAt\": { $exists: false } },\n+              { \"modifiedLog.RepairImgAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n+            ]\n+          }\n+        ]\n+      },\n+      InspectKindlize: {\n+        $and: [\n+          { AuthorityASIN: { $exists: true } },\n+          { AuthorityASIN: { $ne: [''] } },\n+          { AuthorityASIN: { $ne: null } },\n+          { isKindlized: false },\n+          {\n+            $or: [\n+              { \"modifiedLog.InspectKindlizeAt\": { $exists: false } },\n+              { \"modifiedLog.InspectKindlizeAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n+            ]\n+          }\n+        ]\n+      },\n+      AddASIN: {\n+        $and: [\n+          {\n+            $or: [\n+              { AuthorityASIN: { $exists: false } },\n+              { AuthorityASIN: [''] },\n+              { AuthorityASIN: undefined },\n+              { AuthorityASIN: 'UNDEFINED' },\n+              { AuthorityASIN: ['UNDEFINED'] }\n+            ]\n+          },\n+          {\n+            $or: [\n+              { \"modifiedLog.AddASINAt\": { $exists: false } },\n+              { \"modifiedLog.AddASINAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n+            ]\n+          }\n+        ]\n+      },\n+      UpdateUrl: {\n+        $and: [\n+          { isKindlized: true },\n+          { isKindlizedUrl: { $ne: true } },\n+          {\n+            $or: [\n+              { \"modifiedLog.UpdateUrlAt\": { $exists: false } },\n+              { \"modifiedLog.UpdateUrlAt\": { \"$lte\": moment().subtract(PERIODICAL_DAY, 'days') } }\n+            ]\n+          }\n+        ]\n+      }\n+    }\n+  }\n \n-\tsentAllStatus(){\n-\t\tlet val\n-\t\tfor (val in this.conditions) {\n-\t\t\tif (this.conditions.hasOwnProperty(val)) {\n-\t\t\t\tlet _val = val\n-\t\t\t\tBook.count(this.conditions[val], function(err, count){\n-\t\t\t\t\tif(err){\n-\t\t\t\t\t\treturn log.info(err)\n-\t\t\t\t\t}\n-\t\t\t\t\tUtils.postSlack('[' + _val + ']の調査対象 ' + count + '冊')\n-\t\t\t\t})\n-\t\t\t}\n-\t\t}\n-\t\tBook.count(function(err, count){\n-\t\t\tif(err){\n-\t\t\t\treturn log.info(err)\n-\t\t\t}\n-\t\t\tUtils.postSlack('[全書籍]の調査対象 ' + count + '冊')\n-\t\t})\n-\t}\n+  sentAllStatus(){\n+    let val","path":"Librarian/SendStatus.js","position":158,"original_position":158,"commit_id":"47e1ed5e71f2a080d689e13e815c2bd044c10b61","original_commit_id":"47e1ed5e71f2a080d689e13e815c2bd044c10b61","user":{"login":"kogai","id":4057326,"avatar_url":"https://avatars.githubusercontent.com/u/4057326?v=3","gravatar_id":"","url":"https://api.github.com/users/kogai","html_url":"https://github.com/kogai","followers_url":"https://api.github.com/users/kogai/followers","following_url":"https://api.github.com/users/kogai/following{/other_user}","gists_url":"https://api.github.com/users/kogai/gists{/gist_id}","starred_url":"https://api.github.com/users/kogai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kogai/subscriptions","organizations_url":"https://api.github.com/users/kogai/orgs","repos_url":"https://api.github.com/users/kogai/repos","events_url":"https://api.github.com/users/kogai/events{/privacy}","received_events_url":"https://api.github.com/users/kogai/received_events","type":"User","site_admin":false},"body":"__[jshint]__\n*  'let' is available in ES6 (use esnext option) or Mozilla JS extensions (use moz).\n\n*  Missing semicolon.\n","created_at":"2015-10-12T23:29:38Z","updated_at":"2015-10-12T23:29:38Z","html_url":"https://github.com/kogai/kindlized/pull/50#discussion_r41812461","pull_request_url":"https://api.github.com/repos/kogai/kindlized/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/kogai/kindlized/pulls/comments/41812461"},"html":{"href":"https://github.com/kogai/kindlized/pull/50#discussion_r41812461"},"pull_request":{"href":"https://api.github.com/repos/kogai/kindlized/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/kogai/kindlized/pulls/50","id":47475390,"html_url":"https://github.com/kogai/kindlized/pull/50","diff_url":"https://github.com/kogai/kindlized/pull/50.diff","patch_url":"https://github.com/kogai/kindlized/pull/50.patch","issue_url":"https://api.github.com/repos/kogai/kindlized/issues/50","number":50,"state":"closed","locked":false,"title":"テストの整理","user":{"login":"kogai","id":4057326,"avatar_url":"https://avatars.githubusercontent.com/u/4057326?v=3","gravatar_id":"","url":"https://api.github.com/users/kogai","html_url":"https://github.com/kogai","followers_url":"https://api.github.com/users/kogai/followers","following_url":"https://api.github.com/users/kogai/following{/other_user}","gists_url":"https://api.github.com/users/kogai/gists{/gist_id}","starred_url":"https://api.github.com/users/kogai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kogai/subscriptions","organizations_url":"https://api.github.com/users/kogai/orgs","repos_url":"https://api.github.com/users/kogai/repos","events_url":"https://api.github.com/users/kogai/events{/privacy}","received_events_url":"https://api.github.com/users/kogai/received_events","type":"User","site_admin":false},"body":"close #46 ","created_at":"2015-10-12T23:24:13Z","updated_at":"2015-10-12T23:29:38Z","closed_at":"2015-10-12T23:24:18Z","merged_at":"2015-10-12T23:24:18Z","merge_commit_sha":"05445e728f15b17782c217fe262e389e7ccbc5b1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kogai/kindlized/pulls/50/commits","review_comments_url":"https://api.github.com/repos/kogai/kindlized/pulls/50/comments","review_comment_url":"https://api.github.com/repos/kogai/kindlized/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kogai/kindlized/issues/50/comments","statuses_url":"https://api.github.com/repos/kogai/kindlized/statuses/47e1ed5e71f2a080d689e13e815c2bd044c10b61","head":{"label":"kogai:t46","ref":"t46","sha":"47e1ed5e71f2a080d689e13e815c2bd044c10b61","user":{"login":"kogai","id":4057326,"avatar_url":"https://avatars.githubusercontent.com/u/4057326?v=3","gravatar_id":"","url":"https://api.github.com/users/kogai","html_url":"https://github.com/kogai","followers_url":"https://api.github.com/users/kogai/followers","following_url":"https://api.github.com/users/kogai/following{/other_user}","gists_url":"https://api.github.com/users/kogai/gists{/gist_id}","starred_url":"https://api.github.com/users/kogai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kogai/subscriptions","organizations_url":"https://api.github.com/users/kogai/orgs","repos_url":"https://api.github.com/users/kogai/repos","events_url":"https://api.github.com/users/kogai/events{/privacy}","received_events_url":"https://api.github.com/users/kogai/received_events","type":"User","site_admin":false},"repo":{"id":27324315,"name":"kindlized","full_name":"kogai/kindlized","owner":{"login":"kogai","id":4057326,"avatar_url":"https://avatars.githubusercontent.com/u/4057326?v=3","gravatar_id":"","url":"https://api.github.com/users/kogai","html_url":"https://github.com/kogai","followers_url":"https://api.github.com/users/kogai/followers","following_url":"https://api.github.com/users/kogai/following{/other_user}","gists_url":"https://api.github.com/users/kogai/gists{/gist_id}","starred_url":"https://api.github.com/users/kogai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kogai/subscriptions","organizations_url":"https://api.github.com/users/kogai/orgs","repos_url":"https://api.github.com/users/kogai/repos","events_url":"https://api.github.com/users/kogai/events{/privacy}","received_events_url":"https://api.github.com/users/kogai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kogai/kindlized","description":"","fork":false,"url":"https://api.github.com/repos/kogai/kindlized","forks_url":"https://api.github.com/repos/kogai/kindlized/forks","keys_url":"https://api.github.com/repos/kogai/kindlized/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kogai/kindlized/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kogai/kindlized/teams","hooks_url":"https://api.github.com/repos/kogai/kindlized/hooks","issue_events_url":"https://api.github.com/repos/kogai/kindlized/issues/events{/number}","events_url":"https://api.github.com/repos/kogai/kindlized/events","assignees_url":"https://api.github.com/repos/kogai/kindlized/assignees{/user}","branches_url":"https://api.github.com/repos/kogai/kindlized/branches{/branch}","tags_url":"https://api.github.com/repos/kogai/kindlized/tags","blobs_url":"https://api.github.com/repos/kogai/kindlized/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kogai/kindlized/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kogai/kindlized/git/refs{/sha}","trees_url":"https://api.github.com/repos/kogai/kindlized/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kogai/kindlized/statuses/{sha}","languages_url":"https://api.github.com/repos/kogai/kindlized/languages","stargazers_url":"https://api.github.com/repos/kogai/kindlized/stargazers","contributors_url":"https://api.github.com/repos/kogai/kindlized/contributors","subscribers_url":"https://api.github.com/repos/kogai/kindlized/subscribers","subscription_url":"https://api.github.com/repos/kogai/kindlized/subscription","commits_url":"https://api.github.com/repos/kogai/kindlized/commits{/sha}","git_commits_url":"https://api.github.com/repos/kogai/kindlized/git/commits{/sha}","comments_url":"https://api.github.com/repos/kogai/kindlized/comments{/number}","issue_comment_url":"https://api.github.com/repos/kogai/kindlized/issues/comments{/number}","contents_url":"https://api.github.com/repos/kogai/kindlized/contents/{+path}","compare_url":"https://api.github.com/repos/kogai/kindlized/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kogai/kindlized/merges","archive_url":"https://api.github.com/repos/kogai/kindlized/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kogai/kindlized/downloads","issues_url":"https://api.github.com/repos/kogai/kindlized/issues{/number}","pulls_url":"https://api.github.com/repos/kogai/kindlized/pulls{/number}","milestones_url":"https://api.github.com/repos/kogai/kindlized/milestones{/number}","notifications_url":"https://api.github.com/repos/kogai/kindlized/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kogai/kindlized/labels{/name}","releases_url":"https://api.github.com/repos/kogai/kindlized/releases{/id}","created_at":"2014-11-30T04:24:43Z","updated_at":"2015-05-08T02:17:07Z","pushed_at":"2015-10-12T23:24:18Z","git_url":"git://github.com/kogai/kindlized.git","ssh_url":"git@github.com:kogai/kindlized.git","clone_url":"https://github.com/kogai/kindlized.git","svn_url":"https://github.com/kogai/kindlized","homepage":"http://kindlize.it/","size":4280,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"kogai:master","ref":"master","sha":"8761cef12f0e9c6b2dfb5de348b26c85d033dc2c","user":{"login":"kogai","id":4057326,"avatar_url":"https://avatars.githubusercontent.com/u/4057326?v=3","gravatar_id":"","url":"https://api.github.com/users/kogai","html_url":"https://github.com/kogai","followers_url":"https://api.github.com/users/kogai/followers","following_url":"https://api.github.com/users/kogai/following{/other_user}","gists_url":"https://api.github.com/users/kogai/gists{/gist_id}","starred_url":"https://api.github.com/users/kogai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kogai/subscriptions","organizations_url":"https://api.github.com/users/kogai/orgs","repos_url":"https://api.github.com/users/kogai/repos","events_url":"https://api.github.com/users/kogai/events{/privacy}","received_events_url":"https://api.github.com/users/kogai/received_events","type":"User","site_admin":false},"repo":{"id":27324315,"name":"kindlized","full_name":"kogai/kindlized","owner":{"login":"kogai","id":4057326,"avatar_url":"https://avatars.githubusercontent.com/u/4057326?v=3","gravatar_id":"","url":"https://api.github.com/users/kogai","html_url":"https://github.com/kogai","followers_url":"https://api.github.com/users/kogai/followers","following_url":"https://api.github.com/users/kogai/following{/other_user}","gists_url":"https://api.github.com/users/kogai/gists{/gist_id}","starred_url":"https://api.github.com/users/kogai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kogai/subscriptions","organizations_url":"https://api.github.com/users/kogai/orgs","repos_url":"https://api.github.com/users/kogai/repos","events_url":"https://api.github.com/users/kogai/events{/privacy}","received_events_url":"https://api.github.com/users/kogai/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kogai/kindlized","description":"","fork":false,"url":"https://api.github.com/repos/kogai/kindlized","forks_url":"https://api.github.com/repos/kogai/kindlized/forks","keys_url":"https://api.github.com/repos/kogai/kindlized/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kogai/kindlized/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kogai/kindlized/teams","hooks_url":"https://api.github.com/repos/kogai/kindlized/hooks","issue_events_url":"https://api.github.com/repos/kogai/kindlized/issues/events{/number}","events_url":"https://api.github.com/repos/kogai/kindlized/events","assignees_url":"https://api.github.com/repos/kogai/kindlized/assignees{/user}","branches_url":"https://api.github.com/repos/kogai/kindlized/branches{/branch}","tags_url":"https://api.github.com/repos/kogai/kindlized/tags","blobs_url":"https://api.github.com/repos/kogai/kindlized/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kogai/kindlized/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kogai/kindlized/git/refs{/sha}","trees_url":"https://api.github.com/repos/kogai/kindlized/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kogai/kindlized/statuses/{sha}","languages_url":"https://api.github.com/repos/kogai/kindlized/languages","stargazers_url":"https://api.github.com/repos/kogai/kindlized/stargazers","contributors_url":"https://api.github.com/repos/kogai/kindlized/contributors","subscribers_url":"https://api.github.com/repos/kogai/kindlized/subscribers","subscription_url":"https://api.github.com/repos/kogai/kindlized/subscription","commits_url":"https://api.github.com/repos/kogai/kindlized/commits{/sha}","git_commits_url":"https://api.github.com/repos/kogai/kindlized/git/commits{/sha}","comments_url":"https://api.github.com/repos/kogai/kindlized/comments{/number}","issue_comment_url":"https://api.github.com/repos/kogai/kindlized/issues/comments{/number}","contents_url":"https://api.github.com/repos/kogai/kindlized/contents/{+path}","compare_url":"https://api.github.com/repos/kogai/kindlized/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kogai/kindlized/merges","archive_url":"https://api.github.com/repos/kogai/kindlized/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kogai/kindlized/downloads","issues_url":"https://api.github.com/repos/kogai/kindlized/issues{/number}","pulls_url":"https://api.github.com/repos/kogai/kindlized/pulls{/number}","milestones_url":"https://api.github.com/repos/kogai/kindlized/milestones{/number}","notifications_url":"https://api.github.com/repos/kogai/kindlized/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kogai/kindlized/labels{/name}","releases_url":"https://api.github.com/repos/kogai/kindlized/releases{/id}","created_at":"2014-11-30T04:24:43Z","updated_at":"2015-05-08T02:17:07Z","pushed_at":"2015-10-12T23:24:18Z","git_url":"git://github.com/kogai/kindlized.git","ssh_url":"git@github.com:kogai/kindlized.git","clone_url":"https://github.com/kogai/kindlized.git","svn_url":"https://github.com/kogai/kindlized","homepage":"http://kindlize.it/","size":4280,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kogai/kindlized/pulls/50"},"html":{"href":"https://github.com/kogai/kindlized/pull/50"},"issue":{"href":"https://api.github.com/repos/kogai/kindlized/issues/50"},"comments":{"href":"https://api.github.com/repos/kogai/kindlized/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/kogai/kindlized/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/kogai/kindlized/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kogai/kindlized/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/kogai/kindlized/statuses/47e1ed5e71f2a080d689e13e815c2bd044c10b61"}}}}