Search: Save detected pg version in a persistent term.
This commit is contained in:
parent
f9a4cf2097
commit
67b15cc033
4 changed files with 8 additions and 8 deletions
|
|
@ -20,7 +20,7 @@ defmodule Pleroma.Activity.Search do
|
|||
author = Keyword.get(options, :author)
|
||||
|
||||
search_function =
|
||||
if Application.get_env(:postgres, :version) >= 11 do
|
||||
if :persistent_term.get({Pleroma.Repo, :postgres_version}) >= 11 do
|
||||
:websearch
|
||||
else
|
||||
:plain
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ defmodule Pleroma.Application do
|
|||
9.6
|
||||
end
|
||||
|
||||
Application.put_env(:postgres, :version, version)
|
||||
:persistent_term.put({Pleroma.Repo, :postgres_version}, version)
|
||||
end
|
||||
|
||||
def load_custom_modules do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue