Skip to content

Commit 84c2a11

Browse files
authored
chore: remove wait for (#1438)
1 parent 4c004d2 commit 84c2a11

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

scripts/db-migrate.mjs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'zx/globals'
44
const env = $.env;
55
let isCi = ['true', '1'].includes(env?.CI ?? '');
66

7-
const buildVersion = env.BUILD_VERSION;
87
const databaseUrl = env.PRISMA_DATABASE_URL;
98

109
const parseDsn = (dsn) => {
@@ -55,7 +54,7 @@ const retryOperation = async (operation, maxRetries = 5, delay = 3000) => {
5554
}
5655
};
5756

58-
console.log(`DB Migrate Version: ${buildVersion}`);
57+
console.log(`DB Migrate Starting...`);
5958
const { driver, host, port } = parseDsn(databaseUrl);
6059

6160
const adapters = {
@@ -71,15 +70,6 @@ console.log(`wait-for ${host}:${port} 【${driver}】deploying.`);
7170

7271
try {
7372
await retryOperation(async () => {
74-
const result =
75-
await $`scripts/wait-for ${host}:${port} --timeout=15 -- echo 'database driver:【${driver}】started successfully.'`;
76-
if (result.exitCode !== 0) {
77-
console.error(`database driver:【${driver}】, startup exception is about to exit.`);
78-
throw new Error(result.stderr);
79-
}
80-
81-
console.log(`database driver:【${driver}】, ready to start migration.`);
82-
8373
await adapters[driver]();
8474
console.log(`database driver:【${driver}】, migration success.`);
8575
});

0 commit comments

Comments
 (0)