Reputation: 204
I have a few ideas, but thought Im likely touching on a common topic (though I didnt find it)...
Weekly we have about 500 records a single user has been processing, we use pagination set to single record, when the record is updated the page reloads the next record. Works simple and easy. -Codeigniter, PHP.
Ahh, but now I want multiple users to work on the same group of records without grabbing the same record, until they are exhausted, the records not the users.
Is there a general convention for doing this?
off the cuff, I'd likely change the status
of the working record to pending
as its being loaded. Am I missing something? Is there a better/cleaner way?
Upvotes: 0
Views: 197
Reputation: 2791
I don't really see any other solution than setting some sort of "lock" on the record. You might also consider locking say 10 records ahead for each user and in that way create a sub-queue for them. Though in this case you should probably also have a timestamp on the lock and a cron-job to unlock them after a certain period of time (so that someone doesn't go on vacation with 10 records no one else can work on)
Upvotes: 2