comparison twisted/plugins/sat_plugin.py @ 4071:4b842c1fb686

refactoring: renamed `sat` package to `libervia.backend`
author Goffi <goffi@goffi.org>
date Fri, 02 Jun 2023 11:49:51 +0200
parents 524856bd7b19
children 040095a5dc7f
comparison
equal deleted inserted replaced
4070:d10748475025 4071:4b842c1fb686
21 from twisted.python import usage 21 from twisted.python import usage
22 from twisted.plugin import IPlugin 22 from twisted.plugin import IPlugin
23 from twisted.application.service import IServiceMaker 23 from twisted.application.service import IServiceMaker
24 24
25 # XXX: We need to configure logs before any log method is used, so here is the best place. 25 # XXX: We need to configure logs before any log method is used, so here is the best place.
26 from sat.core.constants import Const as C 26 from libervia.backend.core.constants import Const as C
27 from sat.core.i18n import _ 27 from libervia.backend.core.i18n import _
28 28
29 from sat_tmp.wokkel import install as install_wokkel_patches 29 from sat_tmp.wokkel import install as install_wokkel_patches
30 30
31 31
32 install_wokkel_patches() 32 install_wokkel_patches()
33 33
34 34
35 def initialise(options): 35 def initialise(options):
36 """Method to initialise global modules""" 36 """Method to initialise global modules"""
37 # XXX: We need to configure logs before any log method is used, so here is the best place. 37 # XXX: We need to configure logs before any log method is used, so here is the best place.
38 from sat.core import log_config 38 from libervia.backend.core import log_config
39 log_config.sat_configure(C.LOG_BACKEND_TWISTED, C, backend_data=options) 39 log_config.sat_configure(C.LOG_BACKEND_TWISTED, C, backend_data=options)
40 40
41 41
42 class Options(usage.Options): 42 class Options(usage.Options):
43 optParameters = [] 43 optParameters = []
67 asyncioreactor.install() 67 asyncioreactor.install()
68 self.set_debugger() 68 self.set_debugger()
69 # XXX: Libervia must be imported after log configuration, 69 # XXX: Libervia must be imported after log configuration,
70 # because it write stuff to logs 70 # because it write stuff to logs
71 initialise(options.parent) 71 initialise(options.parent)
72 from sat.core.sat_main import SAT 72 from libervia.backend.core.sat_main import SAT
73 return SAT() 73 return SAT()
74 74
75 75
76 serviceMaker = SatMaker() 76 serviceMaker = SatMaker()