Make RunContext internal (#386)

* Make RunContext internal

* Mypy
This commit is contained in:
Eric Zhu
2024-08-21 13:59:59 -07:00
committed by GitHub
parent 09ceef4b4a
commit ed0890525d
40 changed files with 2360 additions and 2329 deletions

View File

@@ -200,12 +200,12 @@ async def main(task: str, temp_dir: str) -> None:
await runtime.register("executor", lambda: Executor(executor=LocalCommandLineCodeExecutor(work_dir=temp_dir)))
await runtime.add_subscription(TypeSubscription("default", "coder"))
await runtime.add_subscription(TypeSubscription("default", "executor"))
run_context = runtime.start()
runtime.start()
# Publish the task message.
await runtime.publish_message(TaskMessage(content=task), topic_id=TopicId("default", "default"))
await run_context.stop_when_idle()
await runtime.stop_when_idle()
if __name__ == "__main__":