refactor(server): cron repository (#13988)

This commit is contained in:
Jason Rasmussen
2024-11-07 12:15:54 -05:00
committed by GitHub
parent 2fe6607aea
commit dc2de47204
13 changed files with 142 additions and 81 deletions

View File

@@ -0,0 +1,20 @@
export const ICronRepository = 'ICronRepository';
type CronBase = {
name: string;
start?: boolean;
};
export type CronCreate = CronBase & {
expression: string;
onTick: () => void;
};
export type CronUpdate = CronBase & {
expression?: string;
};
export interface ICronRepository {
create(cron: CronCreate): void;
update(cron: CronUpdate): void;
}