Renamed application class
This commit is contained in:
parent
2914308d65
commit
118ba99b92
@ -7,7 +7,7 @@ from gismo_core.abc.bot_service_abc import BotServiceABC
|
|||||||
from gismo_core.service.bot_service import BotService
|
from gismo_core.service.bot_service import BotService
|
||||||
|
|
||||||
|
|
||||||
class Application(ApplicationABC):
|
class Gismo(ApplicationABC):
|
||||||
|
|
||||||
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
|
def __init__(self, config: ConfigurationABC, services: ServiceProviderABC):
|
||||||
ApplicationABC.__init__(self, config, services)
|
ApplicationABC.__init__(self, config, services)
|
||||||
|
@ -3,24 +3,24 @@ from typing import Optional
|
|||||||
|
|
||||||
from cpl_core.application import ApplicationABC, ApplicationBuilder
|
from cpl_core.application import ApplicationABC, ApplicationBuilder
|
||||||
|
|
||||||
from gismo.application import Application
|
from gismo.application import Gismo
|
||||||
from gismo.startup import Startup
|
from gismo.startup import Startup
|
||||||
from modules.boot_log.boot_log_extension import BootLogExtension
|
from modules.boot_log.boot_log_extension import BootLogExtension
|
||||||
|
|
||||||
class Main:
|
class Main:
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._app: Optional[ApplicationABC] = None
|
self._gismo: Optional[Gismo] = None
|
||||||
|
|
||||||
async def main(self):
|
async def main(self):
|
||||||
app_builder = ApplicationBuilder(Application)
|
app_builder = ApplicationBuilder(Gismo)
|
||||||
app_builder.use_extension(BootLogExtension)
|
app_builder.use_extension(BootLogExtension)
|
||||||
app_builder.use_startup(Startup)
|
app_builder.use_startup(Startup)
|
||||||
self._app: ApplicationABC = await app_builder.build_async()
|
self._gismo: Gismo = await app_builder.build_async()
|
||||||
await self._app.run_async()
|
await self._gismo.run_async()
|
||||||
|
|
||||||
async def stop(self):
|
async def stop(self):
|
||||||
await self._app.stop_async()
|
await self._gismo.stop_async()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main = Main()
|
main = Main()
|
||||||
|
Reference in New Issue
Block a user