I’m currelty work in symfony 7 application with messenger. I would like to update entity field value in a handler. The handler is working in async. I would like the people in the page not need to reload page for update value. Is this possible ?
Thank you.
My handler async :
public function __invoke(StatusMessage $message)
{
$path = $message->getFileName();
$entity = $this->entityManager->getRepository(Messages::class)->findOneBy([
'id' => $message->getId(),
]);
if ($entity) {
// change status to 'processed'
$entity->setStatus('processed');
$this->entityManager->flush();
}
}