Merge branch 'set_text_search_config_timeout' into 'develop'

mix pleroma.database set_text_search_config now runs concurrently and infinitely

See merge request pleroma/pleroma!3514
This commit is contained in:
Haelwenn 2021-08-28 16:11:52 +00:00
commit 689a59f41f
2 changed files with 8 additions and 4 deletions

View file

@ -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