Grokking Redis
Vote

0% completed

​

4.8 Delayed Jobs and Scheduling

Many jobs should not run now: send a reminder in 24 hours, retry a failed payment in 5 minutes, or release a seat reservation at a deadline. A Redis list is ordered by arrival, not by when a job becomes ready, so it cannot express "not before time T". A scheduler needs a structure ordered by time, and a sorted set is exactly that, since it keeps its members ordered by a numeric score.

This lesson builds a scheduler on one sorted set, jobs:delayed, and follows one job, a reminder called job-1, from scheduling to execution

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content