mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 17:44:44 +08:00
Removed transactionality when dispatching async events, as they run in different processes with different db connections
This commit is contained in:
@@ -69,11 +69,9 @@ class VisitsTracker implements VisitsTrackerInterface
|
||||
}
|
||||
|
||||
$visit = $createVisit($visitor->normalizeForTrackingOptions($this->options));
|
||||
$this->em->transactional(function () use ($visit, $visitor): void {
|
||||
$this->em->persist($visit);
|
||||
$this->em->flush();
|
||||
$this->em->persist($visit);
|
||||
$this->em->flush();
|
||||
|
||||
$this->eventDispatcher->dispatch(new UrlVisited($visit->getId(), $visitor->getRemoteAddress()));
|
||||
});
|
||||
$this->eventDispatcher->dispatch(new UrlVisited($visit->getId(), $visitor->getRemoteAddress()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user