Mercurial > libervia-pubsub
comparison idavoll/tap.py @ 42:7d088c61e131
Make choice of backend an option to mktap. This includes the database
configuration.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Sun, 31 Oct 2004 21:12:55 +0000 |
parents | 4cc41776b7d7 |
children | 66fac7cd9edc |
comparison
equal
deleted
inserted
replaced
41:ea3d3544a52e | 42:7d088c61e131 |
---|---|
6 class Options(usage.Options): | 6 class Options(usage.Options): |
7 optParameters = [ | 7 optParameters = [ |
8 ('jid', None, 'pubsub'), | 8 ('jid', None, 'pubsub'), |
9 ('secret', None, None), | 9 ('secret', None, None), |
10 ('rhost', None, '127.0.0.1'), | 10 ('rhost', None, '127.0.0.1'), |
11 ('rport', None, '6000') | 11 ('rport', None, '6000'), |
12 ('backend', None, 'memory'), | |
13 ('dbuser', None, ''), | |
14 ('dbname', None, 'pubsub'), | |
12 ] | 15 ] |
16 | |
17 def postOptions(self): | |
18 if self['backend'] not in ['pgsql', 'memory']: | |
19 raise usage.UsageError, "Unknown backend!" | |
13 | 20 |
14 def makeService(config): | 21 def makeService(config): |
15 return idavoll.makeService(config) | 22 return idavoll.makeService(config) |