From f34615593bea7dbfacb74d97fcfe531d4df1456c Mon Sep 17 00:00:00 2001 From: Calvin Date: Wed, 14 Aug 2013 18:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83https://github.com/seomoz/qle?= =?UTF-8?q?ss=20=EF=BC=8C=E6=94=B9=E8=BF=9BQueue=E7=9A=84=E5=B0=81?= =?UTF-8?q?=E8=A3=85=EF=BC=8C=E6=9C=AA=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/extension/src/main/resources/redis/batchpop.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/extension/src/main/resources/redis/batchpop.lua b/modules/extension/src/main/resources/redis/batchpop.lua index 9dbc3674..549bc54e 100644 --- a/modules/extension/src/main/resources/redis/batchpop.lua +++ b/modules/extension/src/main/resources/redis/batchpop.lua @@ -2,13 +2,12 @@ -- ARGS: [1]currentTime, [2]batchsize, [3]reliable local batchJobs={} for i=1,ARGV[2] do - local job=redis.call('rpop', KEYS[1]) - batchJobs[i]=job + batchJobs[i]=redis.call('rpop', KEYS[1]) end if (ARGV[3]=='true') then for i=1,ARGV[2] do - redis.call('zadd', KEYS[2], ARGV[1], batchJobs[i]) + redis.call('zadd', KEYS[2], ARGV[1], batchJobs[i]) end end