comparison src/core/sat_main.py @ 1130:adea30ca0b51

core: twistd plugin refactoring: initialisation method manage things which must be done once (reactor installation + logging configuration), this method is called when service is created, so we can have the options passed to twistd (necessary to manage logging configuration). The initialisation order is important: for instance, sat_main must be imported after logging initialisation. This refactoring avoid initialisation issue when SàT backend and libervia are both installed as twisted plugins.
author Goffi <goffi@goffi.org>
date Mon, 25 Aug 2014 17:21:04 +0200
parents 9ae01ccf89c1
children 4e1a0a1523f1
comparison
equal deleted inserted replaced
1129:08f50fdac21b 1130:adea30ca0b51
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat.core.i18n import _, D_, languageSwitch 20 from sat.core.i18n import _, D_, languageSwitch
21 from twisted.application import service 21 from twisted.application import service
22 from twisted.internet import glib2reactor
23 glib2reactor.install()
24 from twisted.internet import defer 22 from twisted.internet import defer
25 from twisted.words.protocols.jabber import jid 23 from twisted.words.protocols.jabber import jid
26 from twisted.words.xish import domish 24 from twisted.words.xish import domish
27 from twisted.internet import reactor 25 from twisted.internet import reactor
28 from wokkel.xmppim import RosterItem 26 from wokkel.xmppim import RosterItem