[Zodb-checkins] CVS: ZODB3/Doc - bdbstorage_custom_zodb.py:1.1
Barry Warsaw
barry@wooz.org
Tue, 7 Jan 2003 15:36:23 -0500
Update of /cvs-repository/ZODB3/Doc
In directory cvs.zope.org:/tmp/cvs-serv3380
Added Files:
bdbstorage_custom_zodb.py
Log Message:
sample custom_zodb.py file
=== Added File ZODB3/Doc/bdbstorage_custom_zodb.py ===
# Rename this file to custom_zodb.py and edit as necessary to switch to
# one of the BDBStorages instead of FileStorage.
import os
from BDBStorage.BerkeleyBase import BerkeleyConfig
from BDBStorage.BDBFullStorage import BDBFullStorage
from BDBStorage.BDBMinimalStorage import BDBMinimalStorage
# Pick one
Class = BDBFullStorage
#Class = Minimal
# 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', 'bdb')
Storage = Class(envpath, config=config)