mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-07-23 22:43:27 +00:00
FIX: Give up trying to reuse the DB connection and rely on pgbouncer (#79)
This commit is contained in:
parent
c582e3b848
commit
b213fe7f94
@ -3,13 +3,9 @@
|
|||||||
module ::DiscourseAi
|
module ::DiscourseAi
|
||||||
module Database
|
module Database
|
||||||
class Connection
|
class Connection
|
||||||
def self.connect!
|
|
||||||
pg_conn = PG.connect(SiteSetting.ai_embeddings_pg_connection_string)
|
|
||||||
@@db = MiniSql::Connection.get(pg_conn)
|
|
||||||
end
|
|
||||||
|
|
||||||
def self.db
|
def self.db
|
||||||
@@db ||= connect!
|
pg_conn = PG.connect(SiteSetting.ai_embeddings_pg_connection_string)
|
||||||
|
MiniSql::Connection.get(pg_conn)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user