任务调度后,增加回调触发

This commit is contained in:
白茶清欢 2022-06-25 19:44:05 +08:00
parent 1136b75c32
commit 384a975cc7

View File

@ -117,9 +117,11 @@ func (d *dispatch) Run(ctx context.Context, cfg *Config) *Result {
} }
} }
result.Data, result.Err = taskInstance.Execute(ctx, cfg) result.Data, result.Err = taskInstance.Execute(ctx, cfg)
_ = taskInstance.Callback(result)
}() }()
} else { } else {
result.Data, result.Err = taskInstance.Execute(ctx, cfg) result.Data, result.Err = taskInstance.Execute(ctx, cfg)
_ = taskInstance.Callback(result)
} }
return result return result
} }