{"action":"created","comment":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/comments/55251947","id":55251947,"diff_hunk":"@@ -165,21 +167,11 @@ def connect\n   # private\n   def load_batch_script(redis)\n     #A Redis Lua EVAL script to fetch a count of keys\n-    #in case count is bigger than current items in queue whole queue will be returned without extra nil values\n-    redis_script = <<EOF\n-          local i = tonumber(ARGV[1])\n-          local res = {}\n-          local length = redis.call('llen',KEYS[1])\n-          if length < i then i = length end\n-          while (i > 0) do\n-            local item = redis.call(\"lpop\", KEYS[1])\n-            if (not item) then\n-              break\n-            end\n-            table.insert(res, item)\n-            i = i-1\n-          end\n-          return res\n+      redis_script = <<EOF\n+        local batchsize = tonumber(ARGV[1])\n+        local result = redis.call('lrange', KEYS[1], 0, batchsize)","path":"lib/logstash/inputs/redis.rb","position":64,"original_position":39,"commit_id":"595d33f8ed5db49fb74e570d147f7e222c73d254","original_commit_id":"c360f32741e422f9a7a8e050b5246024c91ceec4","user":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"body":"See https://github.com/logstash-plugins/logstash-input-redis/pull/36#issuecomment-192464200\r\n\r\nAdded a sleep if results are empty. quarter of a second sleep.","created_at":"2016-03-07T18:54:58Z","updated_at":"2016-03-07T18:54:58Z","html_url":"https://github.com/logstash-plugins/logstash-input-redis/pull/36#discussion_r55251947","pull_request_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36","_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/comments/55251947"},"html":{"href":"https://github.com/logstash-plugins/logstash-input-redis/pull/36#discussion_r55251947"},"pull_request":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36","id":61764816,"html_url":"https://github.com/logstash-plugins/logstash-input-redis/pull/36","diff_url":"https://github.com/logstash-plugins/logstash-input-redis/pull/36.diff","patch_url":"https://github.com/logstash-plugins/logstash-input-redis/pull/36.patch","issue_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/issues/36","number":36,"state":"open","locked":false,"title":"Increase batch size to 125 and use better LUA script.","user":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"body":"Only Travis yml to do.\r\n","created_at":"2016-03-04T20:14:23Z","updated_at":"2016-03-07T18:54:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ebcc1cdb1a51718486aa09a402d7f37384ff47c4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36/commits","review_comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36/comments","review_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/issues/36/comments","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/statuses/595d33f8ed5db49fb74e570d147f7e222c73d254","head":{"label":"guyboertje:fix/default_batch","ref":"fix/default_batch","sha":"595d33f8ed5db49fb74e570d147f7e222c73d254","user":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"repo":{"id":39006635,"name":"logstash-input-redis","full_name":"guyboertje/logstash-input-redis","owner":{"login":"guyboertje","id":84912,"avatar_url":"https://avatars.githubusercontent.com/u/84912?v=3","gravatar_id":"","url":"https://api.github.com/users/guyboertje","html_url":"https://github.com/guyboertje","followers_url":"https://api.github.com/users/guyboertje/followers","following_url":"https://api.github.com/users/guyboertje/following{/other_user}","gists_url":"https://api.github.com/users/guyboertje/gists{/gist_id}","starred_url":"https://api.github.com/users/guyboertje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guyboertje/subscriptions","organizations_url":"https://api.github.com/users/guyboertje/orgs","repos_url":"https://api.github.com/users/guyboertje/repos","events_url":"https://api.github.com/users/guyboertje/events{/privacy}","received_events_url":"https://api.github.com/users/guyboertje/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guyboertje/logstash-input-redis","description":null,"fork":true,"url":"https://api.github.com/repos/guyboertje/logstash-input-redis","forks_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/forks","keys_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/teams","hooks_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/hooks","issue_events_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/issues/events{/number}","events_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/events","assignees_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/assignees{/user}","branches_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/branches{/branch}","tags_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/tags","blobs_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/statuses/{sha}","languages_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/languages","stargazers_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/stargazers","contributors_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/contributors","subscribers_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/subscribers","subscription_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/subscription","commits_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/contents/{+path}","compare_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/merges","archive_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/downloads","issues_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/issues{/number}","pulls_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/pulls{/number}","milestones_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/milestones{/number}","notifications_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/labels{/name}","releases_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/releases{/id}","deployments_url":"https://api.github.com/repos/guyboertje/logstash-input-redis/deployments","created_at":"2015-07-13T10:48:33Z","updated_at":"2016-03-04T11:57:48Z","pushed_at":"2016-03-07T18:51:27Z","git_url":"git://github.com/guyboertje/logstash-input-redis.git","ssh_url":"git@github.com:guyboertje/logstash-input-redis.git","clone_url":"https://github.com/guyboertje/logstash-input-redis.git","svn_url":"https://github.com/guyboertje/logstash-input-redis","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"logstash-plugins:master","ref":"master","sha":"8c93857fa00c5d812b8ebb5df8999d7b5062b503","user":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":25312492,"name":"logstash-input-redis","full_name":"logstash-plugins/logstash-input-redis","owner":{"login":"logstash-plugins","id":8961934,"avatar_url":"https://avatars.githubusercontent.com/u/8961934?v=3","gravatar_id":"","url":"https://api.github.com/users/logstash-plugins","html_url":"https://github.com/logstash-plugins","followers_url":"https://api.github.com/users/logstash-plugins/followers","following_url":"https://api.github.com/users/logstash-plugins/following{/other_user}","gists_url":"https://api.github.com/users/logstash-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/logstash-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/logstash-plugins/subscriptions","organizations_url":"https://api.github.com/users/logstash-plugins/orgs","repos_url":"https://api.github.com/users/logstash-plugins/repos","events_url":"https://api.github.com/users/logstash-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/logstash-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/logstash-plugins/logstash-input-redis","description":null,"fork":false,"url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis","forks_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/forks","keys_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/teams","hooks_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/hooks","issue_events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/issues/events{/number}","events_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/events","assignees_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/assignees{/user}","branches_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/branches{/branch}","tags_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/tags","blobs_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/git/refs{/sha}","trees_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/statuses/{sha}","languages_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/languages","stargazers_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/stargazers","contributors_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/contributors","subscribers_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/subscribers","subscription_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/subscription","commits_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/commits{/sha}","git_commits_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/git/commits{/sha}","comments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/comments{/number}","issue_comment_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/issues/comments{/number}","contents_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/contents/{+path}","compare_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/merges","archive_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/downloads","issues_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/issues{/number}","pulls_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls{/number}","milestones_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/milestones{/number}","notifications_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/labels{/name}","releases_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/releases{/id}","deployments_url":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/deployments","created_at":"2014-10-16T17:03:32Z","updated_at":"2015-11-16T21:20:19Z","pushed_at":"2016-03-07T18:51:28Z","git_url":"git://github.com/logstash-plugins/logstash-input-redis.git","ssh_url":"git@github.com:logstash-plugins/logstash-input-redis.git","clone_url":"https://github.com/logstash-plugins/logstash-input-redis.git","svn_url":"https://github.com/logstash-plugins/logstash-input-redis","homepage":null,"size":48,"stargazers_count":9,"watchers_count":9,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":15,"forks":17,"open_issues":15,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36"},"html":{"href":"https://github.com/logstash-plugins/logstash-input-redis/pull/36"},"issue":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/issues/36"},"comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/logstash-plugins/logstash-input-redis/statuses/595d33f8ed5db49fb74e570d147f7e222c73d254"}}}}