Answer the question
In order to leave comments, you need to log in
Problem with updating data in Symfony and message queue, how to solve?
There is a project on Symfony 4 with a RabbitMq message queue.
Consumer is running and listening to the queue, if a message has arrived, then the command is launched.
Here is a code example from one command:
/** @var Account $account */
$account = $this->container->get('doctrine')->getRepository(Account::class)->find($account_id);
if ($account) {
echo "account=".$account->getUsername()." active=".$account->getActive().PHP_EOL;
if ($account->getActive()) {
$count_all_account = count($this->container->get('doctrine')->getRepository(Account::class)->findBy(['active' => true]));
$second = (int)(40 / $count_all_account);
$account->getActive()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question