Search: Save detected pg version in a persistent term.

This commit is contained in:
lain 2020-11-23 15:29:55 +01:00
commit 67b15cc033
4 changed files with 8 additions and 8 deletions

View file

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

View file

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