mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-06 10:48:12 +02:00
fix(routines): address Greptile review findings
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
38a0cd275e
commit
fd6cfc7149
5 files changed
+77
-21
No files matched your search
@@ -197,10 +197,14 @@ async function openConfiguredDb(configPath: string): Promise<{
|
||||
await ensurePostgresDatabase(adminConnectionString, "paperclip");
|
||||
const connectionString = `postgres://paperclip:paperclip@127.0.0.1:${embeddedHandle.port}/paperclip`;
|
||||
await applyPendingMigrations(connectionString);
|
||||
const db = createDb(connectionString) as ClosableDb;
|
||||
return {
|
||||
db: createDb(connectionString) as ClosableDb,
|
||||
db,
|
||||
stop: async () => {
|
||||
await closeDb(createDb(connectionString) as ClosableDb);
|
||||
await closeDb(db);
|
||||
if (embeddedHandle?.startedByThisProcess) {
|
||||
await embeddedHandle.stop().catch(() => undefined);
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user