Closed cash closed 3 years ago
As an FYI - the first commit prevents anyone from accepting any task for that batch during the transaction. The other requests will wait for the transaction to finish before completing. If we wanted to change that, we would need to limit the number of tasks that we pull back for assignment when locking. The reason we don't do that right now is because have to handle skipped tasks. The processing of filtering out skipped tasks happens after the lock is placed on all possible tasks.
This fixes the race condition when two uses click on the accept next task button at the same time.