Commit be7d1e6e authored by Vincent Pelletier's avatar Vincent Pelletier

Add option to control compression.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2290 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 5edb6d92
......@@ -35,7 +35,9 @@ class Storage(BaseStorage.BaseStorage,
__name__ = 'NEOStorage'
def __init__(self, master_nodes, name, connector=None, read_only=False,
compress=True, **kw):
compress=None, **kw):
if compress is None:
compress = True
BaseStorage.BaseStorage.__init__(self, name)
self._is_read_only = read_only
self.app = Application(master_nodes, name, connector,
......
......@@ -22,6 +22,8 @@ class NeoStorage(BaseConfig):
def open(self):
from neo.client.Storage import Storage
return Storage(master_nodes=self.config.master_nodes,
name=self.config.name, connector = self.config.connector)
name=self.config.name, connector = self.config.connector,
compress=self.config.compress,
)
......@@ -19,5 +19,11 @@
Give the name of the connector used at low-level
</description>
</key>
<key name="compress" required="no" default="true" datatype="boolean">
<description>
true: enable automatic data compression (compression is only used when compressed size is smaller).
false: disable data compression.
</description>
</key>
</sectiontype>
</component>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment