mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-04-28 18:36:22 +02:00
Set deploy_to_public to be asynchronous
This commit is contained in:
parent
6ae3317f25
commit
dfb8e31e3d
1 changed files with 4 additions and 4 deletions
|
|
@ -88,7 +88,7 @@ class Engineer2(RoleZero):
|
|||
"Terminal.run_command": self._eval_terminal_run,
|
||||
"RoleZero.ask_human": self._end,
|
||||
"RoleZero.reply_to_human": self._end,
|
||||
"Deployer.deploy_to_public": self.deploy_to_public,
|
||||
"Deployer.deploy_to_public": self._deploy_to_public,
|
||||
}
|
||||
)
|
||||
else:
|
||||
|
|
@ -101,7 +101,7 @@ class Engineer2(RoleZero):
|
|||
"CodeReview.review": cr.review,
|
||||
"CodeReview.fix": cr.fix,
|
||||
"Terminal.run_command": self.terminal.run_command,
|
||||
"Deployer.deploy_to_public": self.deploy_to_public,
|
||||
"Deployer.deploy_to_public": self._deploy_to_public,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -140,10 +140,10 @@ class Engineer2(RoleZero):
|
|||
# TODO: Consider adding line no to be ready for editing.
|
||||
return f"The file {path} has been successfully created, with content:\n{code}"
|
||||
|
||||
def deploy_to_public(self, dist_dir):
|
||||
async def _deploy_to_public(self, dist_dir):
|
||||
"""fix the dist_dir path to absolute path before deploying"""
|
||||
dist_dir = self.editor._try_fix_path(dist_dir)
|
||||
return self.deployer.deploy_to_public(dist_dir)
|
||||
return await self.deployer.deploy_to_public(dist_dir)
|
||||
|
||||
async def _eval_terminal_run(self, cmd):
|
||||
"""change command pull/push/commit to end."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue