Skip to content

Commit

Permalink
default values and condition for max block size
Browse files Browse the repository at this point in the history
  • Loading branch information
mganesh1308 authored and fmarczin committed Oct 23, 2019
1 parent d53029e commit 9fac516
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions simplekv/net/azurestore.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def map_azure_exceptions(key=None, exc_pass=()):

class AzureBlockBlobStore(KeyValueStore):
def __init__(self, conn_string=None, container=None, public=False,
create_if_missing=True, max_connections=2, max_block_size=4194304,max_single_put_size=67108864, checksum=False,
create_if_missing=True, max_connections=2, max_block_size=None,max_single_put_size=None, checksum=False,
socket_timeout=None):
self.conn_string = conn_string
self.container = container
Expand All @@ -104,8 +104,10 @@ def block_blob_service(self):
connection_string=self.conn_string,
socket_timeout=self.socket_timeout,
)
block_blob_service.MAX_BLOCK_SIZE = self.max_block_size
block_blob_service.MAX_SINGLE_PUT_SIZE = self.max_single_put_size
if self.max_block_size is not None:
block_blob_service.MAX_BLOCK_SIZE = self.max_block_size
if self.max_block_size is not None:
block_blob_service.MAX_SINGLE_PUT_SIZE = self.max_single_put_size

if self.create_if_missing:
block_blob_service.create_container(
Expand Down

0 comments on commit 9fac516

Please sign in to comment.