Permalink
Browse files

Using local explicitly, to pass tests on Redis 2.6

  • Loading branch information...
1 parent cc8927a commit e8e5de32c8353a8c82c32577c366ef4708f88af1 Dan Lecocq committed Apr 17, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 put.lua
  2. +1 −1 stats.lua
View
4 put.lua
@@ -41,10 +41,10 @@ local options = {}
for i = 6, #ARGV, 2 do options[ARGV[i]] = ARGV[i + 1] end
-- Let's see what the old priority, history and tags were
-local history, priority, tags, oldqueue, state, failure, _retries, worker = unpack(redis.call('hmget', 'ql:j:' .. jid, 'history', 'priority', 'tags', 'queue', 'state', 'failure', 'retries', 'worker'))
+local history, priority, tags, oldqueue, state, failure, retries, worker = unpack(redis.call('hmget', 'ql:j:' .. jid, 'history', 'priority', 'tags', 'queue', 'state', 'failure', 'retries', 'worker'))
-- Sanity check on optional args
-retries = assert(tonumber(options['retries'] or _retries or 5), 'Put(): Arg "retries" not a number: ' .. tostring(options['retries']))
+retries = assert(tonumber(options['retries'] or retries or 5) , 'Put(): Arg "retries" not a number: ' .. tostring(options['retries']))
tags = assert(cjson.decode(options['tags'] or tags or '[]' ), 'Put(): Arg "tags" not JSON' .. tostring(options['tags']))
priority = assert(tonumber(options['priority'] or priority or 0), 'Put(): Arg "priority" not a number' .. tostring(options['priority']))
local depends = assert(cjson.decode(options['depends'] or '[]') , 'Put(): Arg "depends" not JSON: ' .. tostring(options['depends']))
View
2 stats.lua
@@ -51,7 +51,7 @@ local histokeys = {
'd1','d2','d3','d4','d5','d6'
}
-mkstats = function(name, bin, queue)
+local mkstats = function(name, bin, queue)
-- The results we'll be sending back
local results = {}

0 comments on commit e8e5de3

Please sign in to comment.