1. I want to do one-click shipping in the background, and then queue up the orders belonging to this pick-up point to send WeChat notifications.
2. WeChat notifications and one-click shipping have been completed, and I just need to queue up and send notifications.
1. Save in redis queue.
2.php provides a non-timeout interface. The function of this interface is to loop to pop the data in the queue and send notifications.
Why use redis
1. Queue cache, high speed, convenient and simple maintenance.
2. The queue form is relatively controllable, and pushing to third parties is a timeout behavior, so it is better to make a separate request interface to submit. Or you can make a crond scheduled task and submit it automatically.
First save the production data into redis, and then the consumer consumes the data and sends a WeChat notification.
Queuing, a better choice is message queue, such as RabbitMQ, ActiveMQ, etc.