mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-26 03:44:58 +08:00
chore: only start runtime process once on Windows
This commit is contained in:
@@ -129,6 +129,7 @@ class PluginRuntimeConnector:
|
|||||||
# We have to launch runtime via cmd but communicate via ws.
|
# We have to launch runtime via cmd but communicate via ws.
|
||||||
self.ap.logger.info('(windows) use cmd to launch plugin runtime and communicate via ws')
|
self.ap.logger.info('(windows) use cmd to launch plugin runtime and communicate via ws')
|
||||||
|
|
||||||
|
if self.runtime_subprocess_on_windows is None: # only launch once
|
||||||
python_path = sys.executable
|
python_path = sys.executable
|
||||||
env = os.environ.copy()
|
env = os.environ.copy()
|
||||||
self.runtime_subprocess_on_windows = await asyncio.create_subprocess_exec(
|
self.runtime_subprocess_on_windows = await asyncio.create_subprocess_exec(
|
||||||
|
|||||||
Reference in New Issue
Block a user