Mercurial > libervia-pubsub
view sat_pubsub.tac @ 331:e93a9fd329d9
affiliations XMPP handling:
/!\ PostGreSQL minimal version raised to 9.5 (for upsert support)
- affiliations can now be handler after node creation using XMPP: affiliationsGet, affiliationsSet (both for node owner) and affiliations (for an entity to know with which nodes it is affiliated on the service) are implemented
- pgsql: getOrCreateEntities helping method has been implemented, it get entity_id and create missing entities when needed.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 26 Mar 2017 20:58:48 +0200 |
parents | 51af2ed8bd50 |
children |
line wrap: on
line source
#!/usr/bin/python #-*- coding: utf-8 -*- # Copyright (c) 2003-2008 Ralph Meijer # See LICENSE for details. """ Example TAC for SàT Pubsub. """ from twisted.application import service from twisted.words.protocols.jabber.jid import JID from sat_pubsub import tap application = service.Application("sat_pubsub") config = { 'jid': JID('sat-pubsub.necton3.int'), 'secret': 'pass', 'rhost': '127.0.0.1', 'rport': 5347, 'backend': 'pgsql', 'dbuser': 'goffi', 'dbpass': 'toto', 'dbname': "pubsub", 'dbhost': "localhost", 'dbport': None, 'verbose': True, 'hide-nodes': False, } idavollService = tap.makeService(config) idavollService.setServiceParent(application) # Set the maximum delay until trying to reconnect. componentService = idavollService.getServiceNamed('component') componentService.factory.maxdelay = 300