From 92f58254995c73c708a686221e2117a851b9b5da Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 22 Nov 2025 04:03:10 +0000 Subject: [PATCH] Refactor: Simplify uniqPath ternary expression Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- back/services/cron.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/back/services/cron.ts b/back/services/cron.ts index 5956653f..bdfe6c51 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -507,9 +507,9 @@ export default class CronService { let { id, command, log_name } = cron; const uniqPath = - log_name === '/dev/null' + log_name === '/dev/null' || !log_name ? await getUniqPath(command, `${id}`) - : log_name || (await getUniqPath(command, `${id}`)); + : log_name; const logTime = dayjs().format('YYYY-MM-DD-HH-mm-ss-SSS'); const logDirPath = path.resolve(config.logPath, `${uniqPath}`); await fs.mkdir(logDirPath, { recursive: true });