Documentation ¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_JOB_QUEUE_SIZE = 50 MAX_IDLE_TIMES = 30 )
View Source
const ( TASK_STATUS_INQUEUE = "in_queque" // 等待执行 TASK_STATUS_RUNNING = "running" // 执行中 TASK_STATUS_RUN_COMPLETE = "run_complete" // 执行完成 TASK_STATUS_WAIT_RESULT = "wait_result" //等待异步结果 TASK_STATUS_SEND_RESULT = "sending_result" // 上报执行结果中 TASK_STATUS_END = "end" // 结束 TASK_STATUS_KILLED = "killed" // 被杀死 )
Variables ¶
View Source
var ( JobHandlerRepository sync.Map // bean name -> *IJobHandler JobRunnerRepository sync.Map // jobId -> *JobRunner )
Functions ¶
func AddJobHandler ¶
func AddJobHandler(executorHandler string, handler handler.IJobHandler)
func GetJobHandler ¶
func GetJobHandler(executorHandler string) handler.IJobHandler
func RemoveJobHandler ¶
func RemoveJobHandler(executorHandler string)
Types ¶
type JobRunner ¶
type JobRunner struct {
// contains filtered or unexported fields
}
func AddJobRunner ¶
func AddJobRunner(jobId int32, handler handler.IJobHandler, triggerCallback *proccess.TriggerCallbackProccessor) *JobRunner
func GetJubRunner ¶
func NewJobRunner ¶
func NewJobRunner(jobId int32, jobHandler handler.IJobHandler, triggerCallback *proccess.TriggerCallbackProccessor) *JobRunner
func RemoveJobRunner ¶
func (*JobRunner) IsRunningOrHasQueue ¶
func (*JobRunner) PushTriggerQueue ¶
func (t *JobRunner) PushTriggerQueue(triggerParam TriggerParam)
Click to show internal directories.
Click to hide internal directories.