/** @var string Compression method to use */
protected $compression;
- const MAX_AGE_PRUNE = 604800; // integer; seconds a job can live once claimed (7 days)
-
- /** @var string Key to prefix the queue keys with (used for testing) */
- protected $key;
-
/**
* @param array $params Possible keys:
* - redisConfig : An array of parameters to RedisConnectionPool::__construct().
static $script =
<<<LUA
local kClaimed, kAttempts, kData = unpack(KEYS)
- local uuid = unpack(ARGV)
+ local id = unpack(ARGV)
-- Unmark the job as claimed
- redis.call('zRem',kClaimed,uuid)
- redis.call('hDel',kAttempts,uuid)
+ local removed = redis.call('zRem',kClaimed,id)
+ -- Check if the job was recycled
+ if removed == 0 then
+ return 0
+ end
+ -- Delete the retry data
+ redis.call('hDel',kAttempts,id)
-- Delete the job data itself
- return redis.call('hDel',kData,uuid)
+ return redis.call('hDel',kData,id)
LUA;
$res = $conn->luaEval( $script,
[