mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 07:40:44 +00:00
refactor: trim cron validation exports
This commit is contained in:
@@ -36,7 +36,7 @@ export function resolveRetentionMs(cronConfig?: CronConfig): number | null {
|
||||
return DEFAULT_RETENTION_MS;
|
||||
}
|
||||
|
||||
export type ReaperResult = {
|
||||
type ReaperResult = {
|
||||
swept: boolean;
|
||||
pruned: number;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const INVALID_CRON_SESSION_TARGET_ID_ERROR = "invalid cron sessionTarget session id";
|
||||
const INVALID_CRON_SESSION_TARGET_ID_ERROR = "invalid cron sessionTarget session id";
|
||||
|
||||
export function isInvalidCronSessionTargetIdError(error: unknown): boolean {
|
||||
return error instanceof Error && error.message === INVALID_CRON_SESSION_TARGET_ID_ERROR;
|
||||
|
||||
@@ -5,16 +5,16 @@ import type { CronSchedule } from "./types.js";
|
||||
const ONE_MINUTE_MS = 60 * 1000;
|
||||
const TEN_YEARS_MS = 10 * 365.25 * 24 * 60 * 60 * 1000;
|
||||
|
||||
export type TimestampValidationError = {
|
||||
type TimestampValidationError = {
|
||||
ok: false;
|
||||
message: string;
|
||||
};
|
||||
|
||||
export type TimestampValidationSuccess = {
|
||||
type TimestampValidationSuccess = {
|
||||
ok: true;
|
||||
};
|
||||
|
||||
export type TimestampValidationResult = TimestampValidationSuccess | TimestampValidationError;
|
||||
type TimestampValidationResult = TimestampValidationSuccess | TimestampValidationError;
|
||||
|
||||
/**
|
||||
* Validates at timestamps in cron schedules.
|
||||
|
||||
Reference in New Issue
Block a user