F
F
Fayozzhon Berdiev2015-10-02 13:24:07
PHP
Fayozzhon Berdiev, 2015-10-02 13:24:07

How to correctly split records in a table for operators?

Good time of the day!
Please forgive me if this question has been asked, I could not formulate correctly to find the answers already.
There is a table with records of visitors and there is N-th number of operators online.
How to programmatically divide the queue into the number of operators so that they can process records without interfering with each other?
The table with entries is updated every second, and operators can also log in and out of the system.
It is necessary to make sure that the records of operators are not visible to each other.
Share your experience, I will be very grateful.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2015-10-02
@Rsa97

Why share anything? At the request of the operator, get the oldest unprocessed record, set its flag "in progress". When processing is complete, change the flag to "processed". If the "in progress" flag is set for too long, clear it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question