View source on GitHub |
Runs a function inside a datastore transaction.
google.appengine.api.datastore.RunInTransactionCustomRetries(
retries, function, *args, **kwargs
)
Runs the user-provided function inside transaction, with a specified number of retries.
Args: retries: number of retries (not counting the initial try) function: a function to be run inside the transaction on all remaining arguments *args: positional arguments for function. **kwargs: keyword arguments for function.
Returns | |
---|---|
the function's return value, if any |
Raises | |
---|---|
TransactionFailedError , if the transaction could not be committed.
|