Mercurial > libervia-pubsub
comparison twisted/plugins/pubsub.py @ 447:cc29a62fb64c
renaming following global Salut à Toi => Libervia renaming:
/!\ application name and environment variables are renamed /!\
- Twisted application name is now `libervia-pubsub`
- environment variable are now prefixed by `LIBERVIA_PUBSUB_`
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 14 Apr 2021 12:05:40 +0200 |
parents | fe24bb60236f |
children | 1a179ad10125 |
comparison
equal
deleted
inserted
replaced
446:67da33212b2b | 447:cc29a62fb64c |
---|---|
1 #!/usr/bin/env python3 | 1 #!/usr/bin/env python3 |
2 #-*- coding: utf-8 -*- | |
3 | 2 |
4 # Copyright (c) 2012-2021 Jérôme Poisson | 3 # Copyright (c) 2012-2021 Jérôme Poisson |
5 # Copyright (c) 2003-2011 Ralph Meijer | 4 # Copyright (c) 2003-2011 Ralph Meijer |
6 | 5 |
7 | 6 |
97 ["admins_jids_list", None, [], "List of administrators' bare jids", | 96 ["admins_jids_list", None, [], "List of administrators' bare jids", |
98 coerceJidListType] | 97 coerceJidListType] |
99 ] | 98 ] |
100 | 99 |
101 # prefix used for environment variables | 100 # prefix used for environment variables |
102 ENV_PREFIX = "SAT_PUBSUB_" | 101 ENV_PREFIX = "LIBERVIA_PUBSUB_" |
103 # mapping from option name to environment variables to use | 102 # mapping from option name to environment variables to use |
104 # each parameter name links to a list of variable environment name | 103 # each parameter name links to a list of variable environment name |
105 # if an environment variable of one of the names exists it will be used | 104 # if an environment variable of one of the names exists it will be used |
106 # as default value, with priority over config file | 105 # as default value, with priority over config file |
107 ENV_OPT_MAP = { | 106 ENV_OPT_MAP = { |
202 self['jid'] = JID(self['jid']) if self['jid'] else None | 201 self['jid'] = JID(self['jid']) if self['jid'] else None |
203 | 202 |
204 | 203 |
205 @implementer(IServiceMaker, IPlugin) | 204 @implementer(IServiceMaker, IPlugin) |
206 class SatPubsubMaker(object): | 205 class SatPubsubMaker(object): |
207 tapname = "sat-pubsub" | 206 tapname = "libervia-pubsub" |
208 description = "Salut à Toi Publish-Subscribe Service Component" | 207 description = "Libervia's Publish-Subscribe Service Component" |
209 options = Options | 208 options = Options |
210 | 209 |
211 def makeService(self, config): | 210 def makeService(self, config): |
212 from wokkel.component import Component | 211 from wokkel.component import Component |
213 from wokkel.disco import DiscoHandler | 212 from wokkel.disco import DiscoHandler |