mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
16 lines
424 B
TypeScript
16 lines
424 B
TypeScript
import { Conf } from '@/config.ts';
|
|
import { DittoDB } from '@/db/DittoDB.ts';
|
|
import { sleep } from '@/test.ts';
|
|
|
|
if (Deno.env.get('CI') && Conf.db.dialect === 'postgres') {
|
|
console.info('Waiting 1 second for postgres to start...');
|
|
await sleep(1_000);
|
|
}
|
|
|
|
// This migrates kysely internally.
|
|
const { kysely } = await DittoDB.getInstance();
|
|
|
|
// Close the connection before exiting.
|
|
await kysely.destroy();
|
|
|
|
Deno.exit();
|