Skip to content

Commit

Permalink
feat: configurable max incoming msg size (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimoneLazzaris committed Oct 19, 2020
1 parent cdebd08 commit 7a5f1c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions immudb/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@


class ImmudbClient:
def __init__(self, immudUrl=None):
def __init__(self, immudUrl=None, MaxMsgSize=4*1024*1024):
if immudUrl is None:
immudUrl = "localhost:3322"
self.channel = grpc.insecure_channel(immudUrl)
self.channel = grpc.insecure_channel(immudUrl,
options=[
('grpc.max_send_message_length', MaxMsgSize),
('grpc.max_receive_message_length', MaxMsgSize),
]
)
self.__stub = schema_pb2_grpc.ImmuServiceStub(self.channel)
self.__rs = None

Expand Down

0 comments on commit 7a5f1c6

Please sign in to comment.