[Zodb-checkins] CVS: ZODB4/BDBStorage/Doc - custom_zodb.py:1.2
Barry Warsaw
barry@wooz.org
Wed, 4 Dec 2002 14:41:05 -0500
Update of /cvs-repository/ZODB4/BDBStorage/Doc
In directory cvs.zope.org:/tmp/cvs-serv16537
Modified Files:
custom_zodb.py
Log Message:
intermediate
=== ZODB4/BDBStorage/Doc/custom_zodb.py 1.1 => 1.2 ===
--- ZODB4/BDBStorage/Doc/custom_zodb.py:1.1 Wed Dec 4 14:29:46 2002
+++ ZODB4/BDBStorage/Doc/custom_zodb.py Wed Dec 4 14:41:04 2002
@@ -1,18 +1,40 @@
+##############################################################################
+#
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+
+# Sample custom_zodb.py for running Zope with a Berkeley storage
+
import os
from BDBStorage.BerkeleyBase import BerkeleyConfig
from BDBStorage.BDBFullStorage import BDBFullStorage
from BDBStorage.BDBMinimalStorage import BDBMinimalStorage
+import BDBStorage
+print 'Using BDBStorage version', BDBStorage.__version__
+
+# The config instance has several attributes which can be used to tune the
+# Berkeley storages. See the BDBStorage.BerkeleyConfig class docstring for
+# details. You should consider at least setting logdir and frequency.
+config = BerkeleyConfig()
+#config.logdir = '/directory/on/different/disk'
+config.interval = 60
+config.frequency = 900
+config.packtime = 3600
+config.classicpack = 2
+
# Pick one
Class = BDBFullStorage
#Class = BDBMinimalStorage
-
-# The config instance has several attributes which can be used to tune Full
-# storage. See the BerkeleyConfig class docstring for details. You should
-# consider at least setting logdir and frequency.
-config = BerkeleyConfig()
-config.logdir = '/directory/on/different/disk'
-config.frequency = 3600
envpath = os.path.join('var', 'full')
Storage = Class(envpath, config=config)