MCPcopy Index your code
hub / github.com/ChineseSubFinder/ChineseSubFinder / checkPriority

Method checkPriority

pkg/task_queue/task_queue.go:90–101  ·  view source on GitHub ↗

checkPriority 检测优先级,会校验范围

(oneJob task_queue2.OneJob)

Source from the content-addressed store, hash-verified

88
89// checkPriority 检测优先级,会校验范围
90func (t *TaskQueue) checkPriority(oneJob task_queue2.OneJob) task_queue2.OneJob {
91
92 if oneJob.TaskPriority > taskPriorityCount {
93 oneJob.TaskPriority = taskPriorityCount
94 }
95
96 if oneJob.TaskPriority < 0 {
97 oneJob.TaskPriority = 0
98 }
99
100 return oneJob
101}
102
103// degrade 降一级,会校验范围
104func (t *TaskQueue) degrade(oneJob task_queue2.OneJob) task_queue2.OneJob {

Callers 4

degradeMethod · 0.95
AddMethod · 0.95
updateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected