forked from xxl-job/xxl-job-executor-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
constants.go
46 lines (35 loc) · 1.01 KB
/
constants.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package xxl
// 响应码
const (
SuccessCode = 200
FailureCode = 500
)
type ScheduleType string
const (
FixRate ScheduleType = "FIX_RATE"
Cron ScheduleType = "CRON"
)
type MisfireStrategy string
const (
DoNothing MisfireStrategy = "DO_NOTHING" // 什么都不做
FireOnceNow MisfireStrategy = "FIRE_ONCE_NOW" // 立即执行
)
type ExecutorBlockStrategy string
const (
SerialExecution ExecutorBlockStrategy = "SERIAL_EXECUTION" // 串行
DiscardLater ExecutorBlockStrategy = "DISCARD_LATER" // 丢弃后续调度
CoverEarly ExecutorBlockStrategy = "COVER_EARLY" // 覆盖之前调度
)
type TriggerStatus int32
const (
Total TriggerStatus = -1 // 全部
Stop TriggerStatus = 0 // 停止
Running TriggerStatus = 1 // 运行
)
type ExecutorRouteStrategy string
const (
First ExecutorRouteStrategy = "FIRST" // 第一个
Last ExecutorBlockStrategy = "LAST" // 最后一个
Round ExecutorBlockStrategy = "ROUND" // 轮询
Random ExecutorRouteStrategy = "RANDOM" // 随机
)