rename orchestrator method start_polling to run_repl

This commit is contained in:
2026-02-10 14:03:37 +03:00
parent 6ed1d35e8a
commit de6d35205c
23 changed files with 79 additions and 81 deletions
+4 -4
View File
@@ -3,11 +3,11 @@ from typer import Typer
from .commands import run_handler, init_handler, new_handler
def main():
def main() -> None:
app = Typer()
app.command("run")(run_handler)
app.command("init")(init_handler)
app.command("new")(new_handler)
app.command("run", help='Command to start the orchestrator repl; the path to the orchestrator is required')(run_handler)
app.command("init", help="Creates a flat/src boilerplate architecture in an existing project")(init_handler)
app.command("new", help="Creates a project and in it flat/src boilerplate architecture")(new_handler)
app()
if __name__ == '__main__':
+2 -2
View File
@@ -22,7 +22,7 @@ def main():
app.include_router(router)
orchestrator = Orchestrator()
orchestrator.start_polling(app)
orchestrator.run_repl(app)
if __name__ == "__main__":
main()
@@ -49,7 +49,7 @@ def main():
app.include_router(router)
orchestrator = Orchestrator()
orchestrator.start_polling(app)
orchestrator.run_repl(app)
if __name__ == "__main__":
main()
+2 -2
View File
@@ -24,7 +24,7 @@ def main():
app.include_router(router)
orchestrator = Orchestrator()
orchestrator.start_polling(app)
orchestrator.run_repl(app)
if __name__ == "__main__":
main()
@@ -51,7 +51,7 @@ def main():
app.include_router(router)
orchestrator = Orchestrator()
orchestrator.start_polling(app)
orchestrator.run_repl(app)
if __name__ == "__main__":
main()
+1 -1
View File
@@ -144,7 +144,7 @@ class BaseApp(BehaviorHandlersSettersMixin):
is_stdout_redirected_by_router=processing_router.is_redirect_stdout_disabled
)
def _run_polling(self) -> None:
def _run_repl(self) -> None:
self._viewer.view_initial_message(self._initial_message)
self._pre_cycle_setup()
while True:
-1
View File
@@ -9,7 +9,6 @@ __all__ = [
from typing import Any, Protocol, TypeVar, Callable
from argenta.response import Response
T = TypeVar("T", contravariant=True)
+2 -2
View File
@@ -30,7 +30,7 @@ class Orchestrator:
if self._arg_parser is not None:
self._arg_parser._parse_args()
def start_polling(self, app: App) -> None:
def run_repl(self, app: App) -> None:
"""
Public. Starting the user input processing cycle
:param app: a running application
@@ -41,4 +41,4 @@ class Orchestrator:
)
setup_dishka(app, container, auto_inject=self._auto_inject_handlers)
app._run_polling()
app._run_repl()