Use shopping cart with queue to avoid overselling

Hi everyone, I have a system that sells food, but when there are products that are in high demand, they are oversold. As a possible solution I have read suggestions to use a queue, but the response in the request to add to the cart, when the job is executed, does not return me to the controller. And I have no way to return it to the view.

I need help!!
Thanks.

does it have anything to do with some extension? If so then mention th extension.
If not you posted in wrong category.

As general advice, keep stock balance and before checkout, check if balance is enough to continue!

I’m using yii2-queue, according to the documentation the driver sync should return de response in the same process, or that’s what I understood about, but it that’s not working for me.

Anyway, I’m going to check your advice.

Thanks.