News for hackers. Stuff that matters.
Re:System design hack: Postgres is a great pub/sub and job s... by ris on Friday November 08, 2019 @08:52PM (#21488997)
I used to do something a little like this with postgres advisory locks. Worker takes out a lock that signifies it's working on a task, if the worker fails or loses its connection in any way the lock gets dropped along with the transaction being rolled back.

Example: https://gist.github.com/risicle/f4807bd706c9862f69aa

Re:System design hack: Postgres is a great pub/sub and job s... by rem7 on Saturday November 09, 2019 @01:18AM (#21489964)
Yeah, in MySQL you can also do this with a named lock. Really like this workflow.