Skip to content

Commit

Permalink
(maintenance): remove deprecated rmdir[sync]
Browse files Browse the repository at this point in the history
  • Loading branch information
matyson committed Oct 1, 2024
1 parent 27c9e2d commit c5aaa84
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions apps/deepsirius-ui/src/server/api/routers/deepsirius-job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { env } from '~/env.mjs';
import { createTRPCRouter, protectedSSHProcedure } from '~/server/api/trpc';
import { createTempScript } from '~/server/remote-job';
import { TRPCError } from '@trpc/server';
import fs from 'fs';
import fs from 'fs/promises';
import { z } from 'zod';
import {
datasetSchema,
Expand Down Expand Up @@ -79,7 +79,7 @@ export const deepsiriusJobRouter = createTRPCRouter({
const scriptName = 'deepsirius-workspace.sbatch';

await connection.putFile(scriptPath, scriptName);
fs.rmdirSync(tempDir, { recursive: true });
await fs.rm(tempDir, { recursive: true });

const { stdout, stderr } = await connection.execCommand(
`sbatch --parsable ${scriptName}`,
Expand Down Expand Up @@ -144,7 +144,7 @@ export const deepsiriusJobRouter = createTRPCRouter({
const scriptName = 'deepsirius-dataset.sbatch';

await connection.putFile(scriptPath, scriptName);
fs.rmdirSync(tempDir, { recursive: true });
await fs.rm(tempDir, { recursive: true });

const { stdout, stderr } = await connection.execCommand(
`sbatch --parsable ${scriptName}`,
Expand Down Expand Up @@ -275,7 +275,7 @@ export const deepsiriusJobRouter = createTRPCRouter({
const scriptName = 'deepsirius-augmentation.sbatch';

await connection.putFile(scriptPath, scriptName);
fs.rmdirSync(tempDir, { recursive: true });
await fs.rm(tempDir, { recursive: true });

const { stdout, stderr } = await connection.execCommand(
`sbatch --parsable ${scriptName}`,
Expand Down Expand Up @@ -340,7 +340,7 @@ export const deepsiriusJobRouter = createTRPCRouter({
const scriptName = 'deepsirius-network.sbatch';

await connection.putFile(scriptPath, scriptName);
fs.rmdirSync(tempDir, { recursive: true });
await fs.rm(tempDir, { recursive: true });

const { stdout, stderr } = await connection.execCommand(
`sbatch --parsable ${scriptName}`,
Expand Down Expand Up @@ -404,7 +404,7 @@ export const deepsiriusJobRouter = createTRPCRouter({
const scriptName = 'deepsirius-network.sbatch';

await connection.putFile(scriptPath, scriptName);
fs.rmdirSync(tempDir, { recursive: true });
await fs.rm(tempDir, { recursive: true });

const { stdout, stderr } = await connection.execCommand(
`sbatch --parsable ${scriptName}`,
Expand Down Expand Up @@ -472,7 +472,7 @@ export const deepsiriusJobRouter = createTRPCRouter({
const scriptName = 'deepsirius-inference.sbatch';

await connection.putFile(scriptPath, scriptName);
fs.rmdirSync(tempDir, { recursive: true });
await fs.rm(tempDir, { recursive: true });

const { stdout, stderr } = await connection.execCommand(
`sbatch --parsable ${scriptName}`,
Expand Down

0 comments on commit c5aaa84

Please sign in to comment.