comparison twisted/plugins/pubsub.py @ 406:a58610ab2983

removed old code: - removed gateway which was an HTTP gateway inherited from Idavoll and which is not used is SàT Pubsub - removed memory_storage which has not been maintained since Idavoll and which is expected to be replaced by a sqlite-based backend - simplejson dependency is not used anymore
author Goffi <goffi@goffi.org>
date Fri, 16 Aug 2019 12:00:03 +0200
parents c56a728412f1
children ccb2a22ea0fc
comparison
equal deleted inserted replaced
405:c56a728412f1 406:a58610ab2983
164 for opt_data in OPT_PARAMETERS_CFG: 164 for opt_data in OPT_PARAMETERS_CFG:
165 self[opt_data[0]] = opt_data[2] 165 self[opt_data[0]] = opt_data[2]
166 166
167 def postOptions(self): 167 def postOptions(self):
168 if self['backend'] not in ['pgsql', 'memory']: 168 if self['backend'] not in ['pgsql', 'memory']:
169 raise usage.UsageError, "Unknown backend!" 169 raise usage.UsageError("Unknown backend!")
170 if self['backend'] == 'memory': 170 if self['backend'] == 'memory':
171 raise NotImplementedError('memory backend is not available at the moment') 171 raise NotImplementedError('memory backend is not available at the moment')
172 172
173 self['jid'] = JID(self['jid']) if self['jid'] else None 173 self['jid'] = JID(self['jid']) if self['jid'] else None
174 174
209 connection_factory=NamedTupleConnection, 209 connection_factory=NamedTupleConnection,
210 **kwargs 210 **kwargs
211 ) 211 )
212 st = Storage(dbpool) 212 st = Storage(dbpool)
213 elif config['backend'] == 'memory': 213 elif config['backend'] == 'memory':
214 from sat_pubsub.memory_storage import Storage 214 raise NotImplementedError('memory backend is not available at the moment')
215 st = Storage()
216 215
217 bs = BackendService(st, config) 216 bs = BackendService(st, config)
218 bs.setName('backend') 217 bs.setName('backend')
219 bs.setServiceParent(s) 218 bs.setServiceParent(s)
220 219