mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-12 20:15:26 +00:00
feat: fixes on pg2
This commit is contained in:
1 parent
530761d08c
commit
cb30a24e05
19 files changed
+355
-237
No files matched your search
@@ -703,6 +703,8 @@ def _backfill_notes(
|
||||
"""
|
||||
INSERT INTO notes (user_id, tool_id, title, content)
|
||||
VALUES (:user_id, CAST(:tool_id AS uuid), :title, :content)
|
||||
ON CONFLICT (user_id, tool_id) DO UPDATE
|
||||
SET content = EXCLUDED.content, title = EXCLUDED.title
|
||||
"""
|
||||
)
|
||||
cursor = mongo_db["notes"].find({}, no_cursor_timeout=True).batch_size(batch_size)
|
||||
@@ -743,7 +745,8 @@ def _backfill_connector_sessions(
|
||||
"""
|
||||
INSERT INTO connector_sessions (user_id, provider, session_data)
|
||||
VALUES (:user_id, :provider, CAST(:session_data AS jsonb))
|
||||
ON CONFLICT DO NOTHING
|
||||
ON CONFLICT (user_id, provider) DO UPDATE
|
||||
SET session_data = EXCLUDED.session_data
|
||||
"""
|
||||
)
|
||||
cursor = mongo_db["connector_sessions"].find({}, no_cursor_timeout=True).batch_size(batch_size)
|
||||
|
||||
Reference in new issue
Block a user