refactor(multi-server): replace executeCommand with execAsyncRemote

This commit is contained in:
Mauricio Siu
2024-09-16 00:40:11 -06:00
parent 19295ba746
commit d8d0b60cb3
76 changed files with 622 additions and 19123 deletions

View File

@@ -8,7 +8,8 @@ import { generatePassword } from "@/templates/utils";
import { TRPCError } from "@trpc/server";
import { eq, getTableColumns } from "drizzle-orm";
import { validUniqueServerAppName } from "./project";
import { executeCommand } from "@/server/utils/servers/command";
import { execAsyncRemote } from "@/server/utils/process/execAsync";
export type MySql = typeof mysql.$inferSelect;
@@ -122,7 +123,7 @@ export const deployMySql = async (mysqlId: string) => {
const mysql = await findMySqlById(mysqlId);
try {
if (mysql.serverId) {
await executeCommand(mysql.serverId, `docker pull ${mysql.dockerImage}`);
await execAsyncRemote(mysql.serverId, `docker pull ${mysql.dockerImage}`);
} else {
await pullImage(mysql.dockerImage);
}