mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-19 09:01:37 +00:00
chore(deadcode): remove unused cron failure target wrapper
This commit is contained in:
@@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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),
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user