4 Commits
Author SHA1 Message Date
Arksine 290be28dae scripts: bump version to 0.2.1
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-11-29 07:03:07 -05:00
Arksine f488e985ab update_manager: implement ability to rebuild the python env
This implementation adds a delay that allows for pip to function correclty after the venv is built.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2020-11-29 06:52:08 -05:00
Arksine 8678e25427 shell_command: return False if an exception is raised
Signed-off- by:  Eric Callahan <arksine.code@gmail.com>
2020-11-29 06:36:34 -05:00
Arksine d41c1c4c00 update_manager: disable python env rebuild
The current method for rebuilding the virtualenv fails. A potential workaround is to do the rebuild and subsequent update with a script.  For now, disable the rebuild.

Signed-off-by:  Eric Callahan <arskine.code@gmail.com>
2020-11-28 07:50:10 -05:00
3 changed files with 13 additions and 6 deletions

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ class ShellCommand:
except Exception:
logging.exception(
f"shell_command: Command ({self.name}) failed")
return
return False
if verbose:
fd = proc.stdout.fileno()
self.io_loop.add_handler(
+10 -3
View File
@@ -123,11 +123,16 @@ class UpdateManager:
'version_info': vinfo,
'busy': self.current_update is not None}
async def execute_cmd(self, cmd, timeout=10., notify=False):
async def execute_cmd(self, cmd, timeout=10., notify=False, retries=1):
shell_command = self.server.lookup_plugin('shell_command')
cb = self.notify_update_response if notify else None
scmd = shell_command.build_shell_command(cmd, callback=cb)
await scmd.run(timeout=timeout, verbose=notify)
while retries:
if await scmd.run(timeout=timeout, verbose=notify):
break
retries -= 1
if not retries:
raise self.server.error("Shell Command Error")
async def execute_cmd_with_response(self, cmd, timeout=10.):
shell_command = self.server.lookup_plugin('shell_command')
@@ -354,6 +359,7 @@ class GitUpdater:
except Exception:
self._log_exc(f"Error creating virtualenv")
return
await tornado.gen.sleep(.5)
if not os.path.expanduser(self.env):
raise self._log_exc("Failed to create new virtualenv", False)
reqs = os.path.join(
@@ -365,7 +371,8 @@ class GitUpdater:
self._notify_status("Updating python packages...")
try:
await self.execute_cmd(
f"{pip} install -r {reqs}", timeout=1200., notify=True)
f"{pip} install -r {reqs}", timeout=1200., notify=True,
retries=3)
except Exception:
self._log_exc("Error updating python requirements")
+2 -2
View File
@@ -1,2 +1,2 @@
env_version=0.2.0
deps_version=0.2.0
env_version=0.2.1
deps_version=0.2.1