Mercurial > libervia-pubsub
comparison idavoll/idavoll.py @ 43:9685b7e291ef
Moved common stuff out of pgsql_backend.py to backend.py.
Implemented Storage class for memory backend.
Implemented item storage for pgsql Storage.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Mon, 01 Nov 2004 12:37:40 +0000 |
parents | 7d088c61e131 |
children | 0947b46c0968 |
comparison
equal
deleted
inserted
replaced
42:7d088c61e131 | 43:9685b7e291ef |
---|---|
88 ("tcp:%s:%s" % (config["rhost"], config["rport"]))) | 88 ("tcp:%s:%s" % (config["rhost"], config["rport"]))) |
89 | 89 |
90 if config['backend'] == 'pgsql': | 90 if config['backend'] == 'pgsql': |
91 import pgsql_backend as b | 91 import pgsql_backend as b |
92 st = b.Storage(user=config['dbuser'], database=config['dbname']) | 92 st = b.Storage(user=config['dbuser'], database=config['dbname']) |
93 bs = b.BackendService(st) | |
94 elif config['backend'] == 'memory': | 93 elif config['backend'] == 'memory': |
95 import memory_backend as b | 94 import memory_backend as b |
96 bs = b.BackendService() | 95 st = b.Storage() |
97 | 96 |
97 bs = b.BackendService(st) | |
98 | 98 |
99 component.IService(bs).setServiceParent(sm) | 99 component.IService(bs).setServiceParent(sm) |
100 | 100 |
101 bsc = b.PublishService() | 101 bsc = b.PublishService() |
102 bsc.setServiceParent(bs) | 102 bsc.setServiceParent(bs) |