zlacker

[parent] [thread] 1 comments
1. kalleb+(OP)[view] [source] 2021-06-12 09:17:03
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
replies(1): >>chx+A
2. chx+A[view] [source] 2021-06-12 09:25:18
>>kalleb+(OP)
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.
[go to top]