Add a created field to the apn retry hash info, increase max interval

This commit is contained in:
Moxie Marlinspike 2019-03-22 21:44:41 -07:00
parent 8277c74c5b
commit afa674e2ea
2 changed files with 6 additions and 1 deletions

View File

@ -36,7 +36,11 @@ local getNextInterval = function(interval)
return 600000
end
return 1800000
if interval < 1800000 then
return 1800000
end
return 3600000
end

View File

@ -1,6 +1,7 @@
-- keys: pending (KEYS[1]), user (KEYS[2])
-- args: timestamp (ARGV[1]), interval (ARGV[2]), account (ARGV[3]), device (ARGV[4])
redis.call("HSET", KEYS[2], "created", ARGV[1])
redis.call("HSET", KEYS[2], "interval", ARGV[2])
redis.call("HSET", KEYS[2], "account", ARGV[3])
redis.call("HSET", KEYS[2], "device", ARGV[4])