mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Update vendor dependencies
This commit is contained in:
parent
34a3fe426b
commit
459bb4531f
747 changed files with 89857 additions and 39711 deletions
11
vendor/google.golang.org/appengine/datastore/transaction.go
generated
vendored
11
vendor/google.golang.org/appengine/datastore/transaction.go
generated
vendored
|
@ -58,12 +58,18 @@ func RunInTransaction(c context.Context, f func(tc context.Context) error, opts
|
|||
if opts != nil {
|
||||
xg = opts.XG
|
||||
}
|
||||
readOnly := false
|
||||
if opts != nil {
|
||||
readOnly = opts.ReadOnly
|
||||
}
|
||||
attempts := 3
|
||||
if opts != nil && opts.Attempts > 0 {
|
||||
attempts = opts.Attempts
|
||||
}
|
||||
var t *pb.Transaction
|
||||
var err error
|
||||
for i := 0; i < attempts; i++ {
|
||||
if err := internal.RunTransactionOnce(c, f, xg); err != internal.ErrConcurrentTransaction {
|
||||
if t, err = internal.RunTransactionOnce(c, f, xg, readOnly, t); err != internal.ErrConcurrentTransaction {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
@ -84,4 +90,7 @@ type TransactionOptions struct {
|
|||
// Attempts controls the number of retries to perform when commits fail
|
||||
// due to a conflicting transaction. If omitted, it defaults to 3.
|
||||
Attempts int
|
||||
// ReadOnly controls whether the transaction is a read only transaction.
|
||||
// Read only transactions are potentially more efficient.
|
||||
ReadOnly bool
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue