delay -> sleep, style tweaks

This commit is contained in:
Alex Gleason
2024-07-11 17:19:47 -05:00
parent 9584638d5c
commit cd961dad86
3 changed files with 9 additions and 6 deletions

View File

@@ -1,9 +1,10 @@
import { Conf } from '@/config.ts';
import { DittoDB } from '@/db/DittoDB.ts';
import { delay } from '@/test.ts';
import { sleep } from '@/test.ts';
if (Deno.env.get('CI') && Deno.env.get('DATABASE_URL')?.startsWith('postgres')) {
console.info('Waiting 15 seconds for postgres to start...');
await delay(15000);
if (Deno.env.get('CI') && Conf.db.dialect === 'postgres') {
console.info('Waiting 1 second for postgres to start...');
await sleep(1_000);
}
const kysely = await DittoDB.getInstance();