mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
rename orchestrator method start_polling to run_repl
This commit is contained in:
@@ -12,6 +12,6 @@ orchestrator = Orchestrator(
|
||||
|
||||
if __name__ == "__main__":
|
||||
if arg_parser.parsed_argspace.get_by_name("dev"):
|
||||
orchestrator.start_polling(App(initial_message="ArgentaDev"))
|
||||
orchestrator.run_repl(App(initial_message="ArgentaDev"))
|
||||
else:
|
||||
orchestrator.start_polling(App())
|
||||
orchestrator.run_repl(App())
|
||||
|
||||
@@ -22,7 +22,7 @@ def main():
|
||||
print(f" Host: {host.value}")
|
||||
print(f" Port: {port.value}")
|
||||
|
||||
orchestrator.start_polling(app)
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -24,4 +24,4 @@ orchestrator = Orchestrator(custom_providers=[ConnectionProvider()])
|
||||
|
||||
# 4. Start the application
|
||||
if __name__ == "__main__":
|
||||
orchestrator.start_polling(app)
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
@@ -60,7 +60,7 @@ orchestrator = Orchestrator()
|
||||
|
||||
def main():
|
||||
app.include_router(router)
|
||||
orchestrator.start_polling(app)
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -9,7 +9,7 @@ orchestrator: Orchestrator = Orchestrator()
|
||||
|
||||
def main() -> None:
|
||||
app.include_router(router)
|
||||
orchestrator.start_polling(app)
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -30,4 +30,4 @@ app.include_router(main_router)
|
||||
|
||||
# 5. Start application
|
||||
if __name__ == "__main__":
|
||||
orchestrator.start_polling(app)
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
@@ -15,4 +15,4 @@ app.include_router(router)
|
||||
|
||||
# 3. Start polling via orchestrator
|
||||
if __name__ == "__main__":
|
||||
orchestrator.start_polling(app)
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
@@ -25,7 +25,7 @@ def test_input_incorrect_command(capsys: CaptureFixture[str]):
|
||||
app.set_unknown_command_handler(lambda command: print(f"Unknown command: {command.trigger}"))
|
||||
|
||||
with patch("builtins.input", side_effect=["help", "q"]):
|
||||
orchestrator.start_polling(app)
|
||||
orchestrator.run_repl(app)
|
||||
|
||||
output = capsys.readouterr().out
|
||||
assert "\nUnknown command: help\n" in output
|
||||
|
||||
Reference in New Issue
Block a user