Re:Do you really need Redis? How to get away with just Postg...
by kalleboo on Saturday June 12, 2021 @05:17AM
(#27482995)
The way we did it (in MYSQL) was "UPDATE tasks SET processid=<unique id for the queue consumer task> WHERE processid IS NULL ORDER BY taskid LIMIT 1" and then look for processid to find your task. I guess the LIMIT on UPDATE might be an mysql extension? Then if your task crashes or dies you can look for invalid processids and do cleanup
[ Parent
| on HN ]