News for hackers. Stuff that matters.
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
Re:Do you really need Redis? How to get away with just Postg... by chx on Saturday June 12, 2021 @05:25AM (#27483031)
Our initial did that too but generating a unique was removed soon after as had expire in there anyways for retries as I mentioned and that is enough.