2 ms·
There are libraries based on Redis, however since Redis 5 to have scheduling is simpler, because now we have ZPOPMAX and ZPOPMIN and the blocking variants as we
by antirez 7y ago
There are libraries based on Redis, however since Redis 5 to have scheduling is simpler, because now we have ZPOPMAX and ZPOPMIN and the blocking variants as well. So add the item in the queue as a sorted set keyed by the unix time, and pop stuff. Using some scripts it is possible to also backup the item currently being processed in order to be resumed on failure, however this is yet not a first class feature like it is for lists (see BLPOPRPUSH).