Ejemplo n.º 1
0
func init() {
	appengine_internal.RegisterErrorCodeMap("taskqueue", pb.TaskQueueServiceError_ErrorCode_name)

	// Datastore error codes are shifted by DATASTORE_ERROR when presented through taskqueue.
	dsCode := int32(pb.TaskQueueServiceError_DATASTORE_ERROR) + int32(dspb.Error_TIMEOUT)
	appengine_internal.RegisterTimeoutErrorCode("taskqueue", dsCode)

	// Transaction registration.
	appengine_internal.RegisterTransactionSetter(setTransaction)
	appengine_internal.RegisterTransactionSetter(func(x *pb.TaskQueueBulkAddRequest, t *dspb.Transaction) {
		for _, req := range x.AddRequest {
			setTransaction(req, t)
		}
	})
}
Ejemplo n.º 2
0
func init() {
	appengine_internal.RegisterErrorCodeMap("urlfetch", pb.URLFetchServiceError_ErrorCode_name)
	appengine_internal.RegisterTimeoutErrorCode("urlfetch", int32(pb.URLFetchServiceError_DEADLINE_EXCEEDED))
}
Ejemplo n.º 3
0
func init() {
	appengine_internal.NamespaceMods["datastore_v3"] = namespaceMod
	appengine_internal.RegisterErrorCodeMap("datastore_v3", pb.Error_ErrorCode_name)
	appengine_internal.RegisterTimeoutErrorCode("datastore_v3", int32(pb.Error_TIMEOUT))
}