File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 16
16
import time
17
17
import uuid
18
18
19
+ from google .api_core import exceptions
19
20
from google .cloud .spanner_v1 import backup
20
21
from google .cloud .spanner_v1 import client
21
22
from google .cloud .spanner_v1 import database
@@ -90,7 +91,8 @@ def sample_instance(
90
91
"created" : str (int (time .time ()))
91
92
},
92
93
)
93
- op = sample_instance .create ()
94
+ retry_429 = retry .RetryErrors (exceptions .ResourceExhausted , delay = 15 )
95
+ op = retry_429 (sample_instance .create )()
94
96
op .result (120 ) # block until completion
95
97
96
98
# Eventual consistency check
Original file line number Diff line number Diff line change 29
29
# 'Development Status :: 5 - Production/Stable'
30
30
release_status = "Development Status :: 5 - Production/Stable"
31
31
dependencies = [
32
- "google-api-core[grpc] >= 1.26.0, <2.0.0dev" ,
33
- "google-cloud-core >= 1.4.1, < 2.0dev" ,
32
+ # NOTE: Maintainers, please do not require google-api-core>=2.x.x
33
+ # Until this issue is closed
34
+ # https://github.com/googleapis/google-cloud-python/issues/10566
35
+ "google-api-core[grpc] >= 1.26.0, <3.0.0dev" ,
36
+ # NOTE: Maintainers, please do not require google-cloud-core>=2.x.x
37
+ # Until this issue is closed
38
+ # https://github.com/googleapis/google-cloud-python/issues/10566
39
+ "google-cloud-core >= 1.4.1, < 3.0dev" ,
34
40
"grpc-google-iam-v1 >= 0.12.3, < 0.13dev" ,
35
41
"proto-plus >= 1.11.0" ,
36
42
"sqlparse >= 0.3.0" ,
You can’t perform that action at this time.
0 commit comments