예제 #1
0
파일: util.go 프로젝트: speedland/service
// RunInBackground a wrapper for runtime.RunInBackground
func RunInBackground(req *wcg.Request, f func(*wcg.Request)) {
	bgReq := req.Clone()
	runtime.RunInBackground(NewContext(req), func(ctx context.Context) {
		bgReq.SetLocal("__gaebg_context", ctx)
		f(bgReq)
	})
}