L
L
LobsterJoe2019-07-22 22:44:32
symfony
LobsterJoe, 2019-07-22 22:44:32

How to monitor the execution status of a console command in Symfony?

There is a console command that can run from 1 to 3 minutes.
I would like to pull it through the API from the controller, well, poll,
for example, once every 5 seconds, for completion.
Actually, I would like to know who uses what to solve such problems.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Skobkin, 2019-07-22
@LobsterJoe

You will not "pull" the team in any way. But you can store its status in some kind of web-accessible storage - for example, Redis.
And if you need absolutely realtime, you can send messages from the command to the websocket server through queues (RabbitMQ, beanstalkd), which will already give the status to the frontend.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question