diff options
author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-12-12 17:30:08 +0300 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-12-14 11:02:32 -0600 |
commit | cebe3c7deff87ba24f43efcf50499c45d3b3e3f9 (patch) | |
tree | 30a66e6e7077496a124848b7dc011155fb0e914e /lib/mix/tasks | |
parent | f687befb93a9ad2c3dc61f47bdbb717cb1421ad5 (diff) | |
download | pleroma-cebe3c7deff87ba24f43efcf50499c45d3b3e3f9.tar.gz pleroma-cebe3c7deff87ba24f43efcf50499c45d3b3e3f9.zip |
Fix for dropping posts/notifs in WS when mix task is executed
- start oban in mix tasks with empty queues, plugins and crontab
- fix for update_users_following_followers_counts
- fix for removed logo.png
- typo in resend confirmation emails mix task docs
- fix for uploads mix task (start Majic.Pool)
- fix for creating user mix task (start :fast_html app)
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r-- | lib/mix/tasks/pleroma/database.ex | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex index a01c36ece..22151ce08 100644 --- a/lib/mix/tasks/pleroma/database.ex +++ b/lib/mix/tasks/pleroma/database.ex @@ -48,9 +48,15 @@ defmodule Mix.Tasks.Pleroma.Database do def run(["update_users_following_followers_counts"]) do start_pleroma() - User - |> Repo.all() - |> Enum.each(&User.update_follower_count/1) + Repo.transaction( + fn -> + from(u in User, select: u) + |> Repo.stream() + |> Stream.each(&User.update_follower_count/1) + |> Stream.run() + end, + timeout: :infinity + ) end def run(["prune_objects" | args]) do |