回调的ctx添加trace_id

This commit is contained in:
Yun
2024-05-28 17:28:20 +08:00
parent e070933e41
commit 2cc97438b4
6 changed files with 26 additions and 3 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ func worker() {
type Worker struct{}
func (w *Worker) Worker(jobType string, uniqueKey string, data interface{}) (timerx.WorkerCode, time.Duration) {
func (w *Worker) Worker(ctx context.Context, jobType string, uniqueKey string, data interface{}) (timerx.WorkerCode, time.Duration) {
fmt.Println("执行时间:", time.Now().Format("2006-01-02 15:04:05"))
fmt.Println(uniqueKey, jobType)
fmt.Println(data)