Mercurial > libervia-pubsub
changeset 109:9fb8f0867d02
Use storage.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Fri, 08 Apr 2005 10:16:53 +0000 |
parents | 1c18759d2afb |
children | 7043839982ba |
files | idavoll/idavoll.py |
diffstat | 1 files changed, 15 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/idavoll/idavoll.py Fri Apr 08 10:16:08 2005 +0000 +++ b/idavoll/idavoll.py Fri Apr 08 10:16:53 2005 +0000 @@ -139,12 +139,14 @@ LogService().setServiceParent(sm) if config['backend'] == 'pgsql': - import pgsql_backend as b - st = b.Storage(user=config['dbuser'], database=config['dbname']) + import pgsql_storage + st = pgsql_storage.Storage(user=config['dbuser'], + database=config['dbname']) elif config['backend'] == 'memory': - import memory_backend as b - st = b.Storage() + import memory_storage + st = memory_storage.Storage() + import generic_backend as b bs = b.BackendService(st) c = component.IService(bs) @@ -171,18 +173,17 @@ bsc.setServiceParent(bs) component.IService(bsc).setServiceParent(sm) - if config['backend'] == 'pgsql': - bsc = b.ItemRetrievalService() - bsc.setServiceParent(bs) - component.IService(bsc).setServiceParent(sm) + bsc = b.ItemRetrievalService() + bsc.setServiceParent(bs) + component.IService(bsc).setServiceParent(sm) - bsc = b.RetractionService() - bsc.setServiceParent(bs) - component.IService(bsc).setServiceParent(sm) + bsc = b.RetractionService() + bsc.setServiceParent(bs) + component.IService(bsc).setServiceParent(sm) - bsc = b.NodeDeletionService() - bsc.setServiceParent(bs) - component.IService(bsc).setServiceParent(sm) + bsc = b.NodeDeletionService() + bsc.setServiceParent(bs) + component.IService(bsc).setServiceParent(sm) s = IdavollService() s.setServiceParent(sm)