mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-14 02:24:31 +00:00
Update StatusReplyPipeline, remove expensive reply count re-calculation query
This commit is contained in:
parent
06c10401c8
commit
a2f8aad1d5
1 changed files with 0 additions and 8 deletions
|
@ -68,14 +68,6 @@ class StatusReplyPipeline implements ShouldQueue
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config('database.default') === 'mysql') {
|
|
||||||
DB::transaction(function() use($reply) {
|
|
||||||
$count = DB::select( DB::raw("select id, in_reply_to_id from statuses, (select @pv := :kid) initialisation where id > @pv and find_in_set(in_reply_to_id, @pv) > 0 and @pv := concat(@pv, ',', id)"), [ 'kid' => $reply->id]);
|
|
||||||
$reply->reply_count = count($count);
|
|
||||||
$reply->save();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
DB::transaction(function() use($target, $actor, $status) {
|
DB::transaction(function() use($target, $actor, $status) {
|
||||||
$notification = new Notification();
|
$notification = new Notification();
|
||||||
$notification->profile_id = $target->id;
|
$notification->profile_id = $target->id;
|
||||||
|
|
Loading…
Reference in a new issue