aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsomeone <nobody@nowhere>2021-08-15 13:49:12 -0400
committerHaelwenn (lanodan) Monnier <contact@hacktivis.me>2021-08-28 18:29:43 +0200
commitcc4f20b1307f5b308369ea20541df10e1e2a239c (patch)
tree7e8bbed1a17340a7dac28f9e836bbbbec8ebd666 /lib
parent20084329ea4dc2f978c6451c46ed76995064b864 (diff)
downloadpleroma-cc4f20b1307f5b308369ea20541df10e1e2a239c.tar.gz
mix pleroma.database set_text_search_config now runs concurrently and infinitely
Backport of: https://git.pleroma.social/pleroma/pleroma/-/merge_requests/3514
Diffstat (limited to 'lib')
-rw-r--r--lib/mix/tasks/pleroma/database.ex8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex
index 57f73d12b..a973beaa9 100644
--- a/lib/mix/tasks/pleroma/database.ex
+++ b/lib/mix/tasks/pleroma/database.ex
@@ -209,7 +209,9 @@ defmodule Mix.Tasks.Pleroma.Database do
new.fts_content := to_tsvector(new.data->>'content');
RETURN new;
END
- $$ LANGUAGE plpgsql"
+ $$ LANGUAGE plpgsql",
+ [],
+ timeout: :infinity
)
shell_info("Refresh RUM index")
@@ -219,7 +221,9 @@ defmodule Mix.Tasks.Pleroma.Database do
Ecto.Adapters.SQL.query!(
Pleroma.Repo,
- "CREATE INDEX objects_fts ON objects USING gin(to_tsvector('#{tsconfig}', data->>'content')); "
+ "CREATE INDEX CONCURRENTLY objects_fts ON objects USING gin(to_tsvector('#{tsconfig}', data->>'content')); ",
+ [],
+ timeout: :infinity
)
end