// useTQ adds a gae.TaskQueue implementation to context, accessible // by gae.GetTQ(c) func useTQ(c context.Context) context.Context { return tq.SetRawFactory(c, func(ci context.Context, wantTxn bool) tq.RawInterface { if wantTxn { return tqImpl{AEContext(ci)} } return tqImpl{AEContextNoTxn(ci)} }) }
func useTQ(c context.Context) context.Context { return tq.SetRawFactory(c, func(ic context.Context, wantTxn bool) tq.RawInterface { ns := curGID(ic).namespace var tqd memContextObj if !wantTxn { tqd = curNoTxn(ic).Get(memContextTQIdx) } else { tqd = cur(ic).Get(memContextTQIdx) } if x, ok := tqd.(*taskQueueData); ok { return &taskqueueImpl{x, ic, ns} } return &taskqueueTxnImpl{tqd.(*txnTaskQueueData), ic, ns} }) }
func useTQ(c context.Context) context.Context { return tq.SetRawFactory(c, func(ic context.Context) tq.RawInterface { tqd := cur(ic).Get(memContextTQIdx) if x, ok := tqd.(*taskQueueData); ok { return &taskqueueImpl{ x, ic, curGID(ic).namespace, } } return &taskqueueTxnImpl{ tqd.(*txnTaskQueueData), ic, curGID(ic).namespace, } }) }
// useTQ adds a gae.TaskQueue implementation to context, accessible // by gae.GetTQ(c) func useTQ(c context.Context) context.Context { return tq.SetRawFactory(c, func(ci context.Context) tq.RawInterface { return tqImpl{ci} }) }