From 1989726eb65bd70d998f103d65c5bc79be6d005e Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sun, 21 Jun 2026 00:28:58 +0800 Subject: [PATCH] chore(deadcode): remove unused cron failure target wrapper --- src/cron/session-target.test.ts | 4 ---- src/cron/session-target.ts | 12 ------------ 2 files changed, 16 deletions(-) diff --git a/src/cron/session-target.test.ts b/src/cron/session-target.test.ts index 127e86007f8d..623df35cc43f 100644 --- a/src/cron/session-target.test.ts +++ b/src/cron/session-target.test.ts @@ -3,7 +3,6 @@ import { describe, expect, it } from "vitest"; import { resolveCronCurrentSessionTarget, resolveCronDeliverySessionKey, - resolveCronFailureNotificationSessionKey, resolveCronNotificationSessionKey, resolveCronSessionTargetSessionKey, } from "./session-target.js"; @@ -65,8 +64,5 @@ describe("cron session target helpers", () => { expect(resolveCronNotificationSessionKey({ jobId: "job-1", sessionKey: " " })).toBe( "cron:job-1:failure", ); - expect( - resolveCronFailureNotificationSessionKey({ id: "job-2", sessionTarget: "isolated" }), - ).toBe("cron:job-2:failure"); }); }); diff --git a/src/cron/session-target.ts b/src/cron/session-target.ts index 9209edd8fc0d..70606ba5736c 100644 --- a/src/cron/session-target.ts +++ b/src/cron/session-target.ts @@ -63,15 +63,3 @@ export function resolveCronNotificationSessionKey(params: { ? params.sessionKey.trim() : `cron:${params.jobId}:failure`; } - -/** Resolves the session key used to deliver failure notifications for a cron job. */ -export function resolveCronFailureNotificationSessionKey(job: { - id: string; - sessionTarget?: string | null; - sessionKey?: string | null; -}): string { - return resolveCronNotificationSessionKey({ - jobId: job.id, - sessionKey: resolveCronDeliverySessionKey(job), - }); -}