feat(schedules): add schedules server

This commit is contained in:
Mauricio Siu
2024-10-05 22:11:38 -06:00
parent 651bf3a303
commit 43555cdabe
19 changed files with 584 additions and 122 deletions

View File

@@ -0,0 +1,16 @@
import { z } from "zod";
export const jobQueueSchema = z.discriminatedUnion("type", [
z.object({
cronSchedule: z.string(),
type: z.literal("backup"),
backupId: z.string(),
}),
z.object({
cronSchedule: z.string(),
type: z.literal("server"),
serverId: z.string(),
}),
]);
export type QueueJob = z.infer<typeof jobQueueSchema>;