mirror of
https://github.com/whyour/qinglong.git
synced 2026-08-13 12:23:29 +08:00
修改定时规则类型
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { ScheduleType } from './type';
|
||||
|
||||
export const scheduleTypeMap = {
|
||||
[ScheduleType.Normal]: '',
|
||||
[ScheduleType.Once]: '@once',
|
||||
[ScheduleType.Boot]: '@boot',
|
||||
};
|
||||
|
||||
export const getScheduleType = (schedule?: string): ScheduleType => {
|
||||
if (schedule?.startsWith('@once')) return ScheduleType.Once;
|
||||
if (schedule?.startsWith('@boot')) return ScheduleType.Boot;
|
||||
return ScheduleType.Normal;
|
||||
};
|
||||
Reference in New Issue
Block a user