File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -151,8 +151,8 @@ async def send_message_async(self, message: MessageProtocol) -> None:
151
151
await asyncio .sleep (0 )
152
152
153
153
154
- class Application (LogMixin ):
155
- """Application class.
154
+ class AsyncApplication (LogMixin ):
155
+ """Asynchronous Application class.
156
156
157
157
Main Responsibilities:
158
158
- Create/retrieve event loop if needed.
@@ -258,7 +258,7 @@ def _handle_keyboard_interrupt(self):
258
258
self .info ("Received a keyboard interrupt. Exiting..." )
259
259
self .info ("Press Ctrl+C one more time to kill immediately." )
260
260
self .message_router .message_pipe .put_nowait (
261
- Application .Stop (content = None )
261
+ AsyncApplication .Stop (content = None )
262
262
)
263
263
else :
264
264
raise e
Original file line number Diff line number Diff line change 7
7
from importlib .metadata import entry_points
8
8
from typing import Protocol , TypeVar
9
9
10
- from .asyncs import Application , MessageProtocol , MessageRouter
10
+ from .asyncs import AsyncApplication , MessageProtocol , MessageRouter
11
11
from .constructors import (
12
12
Factory ,
13
13
ProviderGroup ,
@@ -80,7 +80,7 @@ async def shout(self) -> AsyncGenerator[MessageProtocol, None]:
80
80
yield HelloWorldMessage (msg )
81
81
await asyncio .sleep (1 )
82
82
83
- yield Application .Stop (content = None )
83
+ yield AsyncApplication .Stop (content = None )
84
84
85
85
86
86
def run_helloworld ():
@@ -90,7 +90,7 @@ def run_helloworld():
90
90
factory = Factory (
91
91
log_providers ,
92
92
ProviderGroup (
93
- SingletonProvider (Application ),
93
+ SingletonProvider (AsyncApplication ),
94
94
SingletonProvider (MessageRouter ),
95
95
Echo ,
96
96
Narc ,
@@ -99,7 +99,7 @@ def run_helloworld():
99
99
100
100
with multiple_constant_providers (factory , parameters ):
101
101
factory [AppLogger ].setLevel (arg_name_space .log_level .upper ())
102
- app = factory [Application ]
102
+ app = factory [AsyncApplication ]
103
103
echo = factory [Echo ]
104
104
narc = factory [Narc ]
105
105
You can’t perform that action at this time.
0 commit comments