3 ms·
Locking the task row and doing the work in the same transaction has the nice property, that the task will be available again, if the worker fails and the transa
by w23j 9y ago
Locking the task row and doing the work in the same transaction has the nice property, that the task will be available again, if the worker fails and the transaction is rolled back.
Unfortunately this may cause problems when the tasks take considerable time to complete and long running transactions are the result: "Postgres Job Queues & Failure By MVCC" https://brandur.org/postgres-queues https://brandur.org/postgres-queues