Mercurial > libervia-pubsub
comparison sat_pubsub/tap_http.py @ 234:51af2ed8bd50
replaced idavoll imports by sat_pubsub imports
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 17 May 2012 01:53:12 +0200 |
parents | 564ae55219e1 |
children | 64f780413b82 |
comparison
equal
deleted
inserted
replaced
233:564ae55219e1 | 234:51af2ed8bd50 |
---|---|
56 from twisted.conch import manhole, manhole_ssh | 56 from twisted.conch import manhole, manhole_ssh |
57 from twisted.cred import portal, checkers | 57 from twisted.cred import portal, checkers |
58 from twisted.web2 import channel, log, resource, server | 58 from twisted.web2 import channel, log, resource, server |
59 from twisted.web2.tap import Web2Service | 59 from twisted.web2.tap import Web2Service |
60 | 60 |
61 from idavoll import gateway, tap | 61 from sat_pubsub import gateway, tap |
62 from idavoll.gateway import RemoteSubscriptionService | 62 from sat_pubsub.gateway import RemoteSubscriptionService |
63 | 63 |
64 class Options(tap.Options): | 64 class Options(tap.Options): |
65 optParameters = [ | 65 optParameters = [ |
66 ('webport', None, '8086', 'Web port'), | 66 ('webport', None, '8086', 'Web port'), |
67 ] | 67 ] |
89 cs = s.getServiceNamed('component') | 89 cs = s.getServiceNamed('component') |
90 | 90 |
91 # Set up XMPP service for subscribing to remote nodes | 91 # Set up XMPP service for subscribing to remote nodes |
92 | 92 |
93 if config['backend'] == 'pgsql': | 93 if config['backend'] == 'pgsql': |
94 from idavoll.pgsql_storage import GatewayStorage | 94 from sat_pubsub.pgsql_storage import GatewayStorage |
95 gst = GatewayStorage(bs.storage.dbpool) | 95 gst = GatewayStorage(bs.storage.dbpool) |
96 elif config['backend'] == 'memory': | 96 elif config['backend'] == 'memory': |
97 from idavoll.memory_storage import GatewayStorage | 97 from sat_pubsub.memory_storage import GatewayStorage |
98 gst = GatewayStorage() | 98 gst = GatewayStorage() |
99 | 99 |
100 ss = RemoteSubscriptionService(config['jid'], gst) | 100 ss = RemoteSubscriptionService(config['jid'], gst) |
101 ss.setHandlerParent(cs) | 101 ss.setHandlerParent(cs) |
102 ss.startService() | 102 ss.startService() |