For the implementation of php queue tasks, consult experts! To implement a broadcast function, broadcast has the start time, end time, Interval time, and priority. See the following table:
To implement this function, create a broadcast, determine the start time, add the broadcast to the queue, and use a timer to execute the broadcast in the queue.
1. how to put data in the queue?
2. how do I retrieve data from the queue?
3. how can I determine the playing sequence of a broadcast based on the priority, such as 1, 2, and 3?
4. how does one Asynchronous call execute only one do while to execute all broadcasts?
5. after modifying the broadcast, how can I replace the existing broadcast in the drop-down column?
Thank you!
Reply to discussion (solution)
The requirement you mentioned does not show that there is a need to use a queue, and it is superfluous. what queue is the priority? you can use php to process it in the background. Use mysql.
If you want to use a queue, you can use HTTPSQS
The requirement you mentioned does not show that there is a need to use a queue, and it is superfluous. what queue is the priority? you can use php to process it in the background. Use mysql.
Can you tell me more? What is PHP resident background?
Redis or database has been implemented...
Redis or database has been implemented... how can the database be implemented?
Write mysql or redis directly, and then query SQL.
What is a queue, first-in-first-out
Don't sink your posts !!!
Is it difficult to queue... don't think too complicated...
Use mysql if performance is not emphasized
1. check all the data whose flag bit is 0. if you use php, set the flag bit to 1.
2. use the where flag bit = 0 limit 1 to retrieve the data and set the flag bit of the data to 1.
Redis is simpler, and supports the queue format directly. for details, refer to the redis operation method...