- refactor jxcontent and tasksch (remove dependency from jxcontent to tasksch)
- send dingding msg to user when async task finished
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
@@ -19,11 +20,11 @@ type SeqTask struct {
|
||||
worker SeqWorkFunc
|
||||
}
|
||||
|
||||
func NewSeqTask(taskName string, userName string, worker SeqWorkFunc, stepCount int, params ...interface{}) *SeqTask {
|
||||
func NewSeqTask(taskName string, ctx *jxcontext.Context, worker SeqWorkFunc, stepCount int, params ...interface{}) *SeqTask {
|
||||
task := &SeqTask{
|
||||
worker: worker,
|
||||
}
|
||||
task.Init(1, 1, false, params, taskName, userName, stepCount, stepCount)
|
||||
task.Init(1, 1, false, params, taskName, ctx, stepCount, stepCount)
|
||||
return task
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user