File tree Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Expand file tree Collapse file tree 1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change @@ -96,26 +96,13 @@ Check on Current Database Operation
96
96
The :meth: `~google.cloud.spanner.database.Database.create ` and
97
97
:meth: `~google.cloud.spanner.database.Database.update ` methods of instance
98
98
object trigger long-running operations on the server, and return instances
99
- of the :class: `~google.cloud.spanner.database.Operation ` class.
100
-
101
- You can check if a long-running operation has finished
102
- by using its :meth: `~google.cloud.spanner.database.Operation.finished `
103
- method:
99
+ conforming to the :class: `~.concurrent.futures.Future ` class.
104
100
105
101
.. code :: python
106
102
107
103
>> > operation = instance.create()
108
- >> > operation.finished()
109
- True
110
-
111
- .. note ::
104
+ >> > operation.result()
112
105
113
- Once an :class: `~google.cloud.spanner.instance.Operation ` object
114
- has returned :data: `True ` from its
115
- :meth: `~google.cloud.spanner.instance.Operation.finished ` method, the
116
- object should not be re-used. Subsequent calls to
117
- :meth: `~google.cloud.spanner.instance.Operation.finished `
118
- will result in an :exc`ValueError` being raised.
119
106
120
107
Non-Admin Database Usage
121
108
========================
You can’t perform that action at this time.
0 commit comments