ReactionTotal aggregates updates synchronously when you have
QUEUE_CONNECTION=sync defined in
.env file. On large databases this operations are expensive and could lead to long wait time and browser hanging connection.
There are 2 listeners which are responsible for aggregates updates:
IncrementAggregates listener awaits for the
ReactionHasBeenAdded event being dispatched and runs async job
DecrementAggregates listener awaits for the
ReactionHasBeenRemoved event being dispatched and runs async job
Setup queue connection in your application and updates will be executed on background.
Updated over 2 years ago