Question

How can I run controller in background? I read about Message Queues and Deferred Actions, but it is hard for me to understand how it works and which should I use.

For now it is implemented like this: Mass Action Button on Product Listing -> Controller -> Model -> Success (or Error) message.

I would like the information to be displayed after pressing the button that the synchronization is in progress, and when it is over - that it has finished (a message on screen or in the logs).

Was it helpful?

Solution

You can study the code from Magento, here in the Cart Price rule section, under Manage Coupon Codes, when you press Generate, it will send the request to the queue

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top