apalis-redis 0.7.4

Redis Storage for apalis: use Redis for background jobs and message queueing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
-- KEYS[1]: the job data hash
-- KEYS[2]: the scheduled set

-- ARGV[1]: the job ID
-- ARGV[2]: the serialized job data
-- ARGV[3]: the time to schedule the job

-- Returns: 1 if the job was newly scheduled, 0 if it already exists

-- delete the job to keep track of context
redis.call("HDEL", KEYS[1], ARGV[1])
-- Set job data in hash
local set = redis.call("hsetnx", KEYS[1], ARGV[1], ARGV[2])
redis.call("zadd", KEYS[2], ARGV[3], ARGV[1])
return set