Skip to content

Commit 805bbb7

Browse files
authored
fix: add keepalive changes to synth.py (#55)
Co-authored-by: larkee <larkee@users.noreply.github.com>
1 parent c45f4fc commit 805bbb7

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

synth.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@
4646
s.replace(
4747
"google/cloud/spanner_v1/gapic/transports/spanner_grpc_transport.py",
4848
"from google.cloud.spanner_v1.proto import spanner_pb2_grpc\n",
49-
"\g<0>\n\n_SPANNER_GRPC_CONFIG = 'spanner.grpc.config'\n",
49+
"\g<0>\n\n_GRPC_KEEPALIVE_MS = 2 * 60 * 1000\n"
50+
"_SPANNER_GRPC_CONFIG = 'spanner.grpc.config'\n",
51+
)
52+
53+
s.replace(
54+
"google/cloud/spanner_v1/gapic/transports/spanner_grpc_transport.py",
55+
"(\s+)'grpc.max_receive_message_length': -1,",
56+
"\g<0>\g<1>\"grpc.keepalive_time_ms\": _GRPC_KEEPALIVE_MS,",
5057
)
5158

5259
s.replace(

0 commit comments

Comments
 (0)