cyclo-manager 1.0.0.dev3__tar.gz → 1.0.0.dev5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/PKG-INFO +1 -1
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_host_agent/routers/update.py +7 -9
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/PKG-INFO +1 -1
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager_cli/cli.py +8 -4
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/pyproject.toml +1 -1
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/README.md +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_host_agent/__init__.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_host_agent/main.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_host_agent/models.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_host_agent/routers/__init__.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_host_agent/routers/repos.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/SOURCES.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/dependency_links.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/entry_points.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/requires.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/top_level.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager_cli/__init__.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager_cli/config/config.yml +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager_cli/docker/docker-compose.yml +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cyclo-manager
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.dev5
|
|
4
4
|
Summary: cyclo_manager CLI: pip-installable launcher for cyclo_manager server and UI containers. Run 'cyclo_manager up' to start Docker stack.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
import asyncio
|
|
22
22
|
import logging
|
|
23
|
-
import
|
|
23
|
+
import sys
|
|
24
24
|
|
|
25
25
|
from fastapi import APIRouter, HTTPException, status
|
|
26
26
|
|
|
@@ -31,11 +31,11 @@ router = APIRouter(prefix='/system', tags=['system'])
|
|
|
31
31
|
_update_status: dict = {'phase': 'idle', 'output': '', 'error': ''}
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
async def _run_update(
|
|
34
|
+
async def _run_update() -> None:
|
|
35
35
|
global _update_status
|
|
36
36
|
try:
|
|
37
37
|
proc = await asyncio.create_subprocess_exec(
|
|
38
|
-
|
|
38
|
+
sys.executable, '-m', 'cyclo_manager_cli.cli', 'update',
|
|
39
39
|
stdout=asyncio.subprocess.PIPE,
|
|
40
40
|
stderr=asyncio.subprocess.PIPE,
|
|
41
41
|
)
|
|
@@ -50,6 +50,9 @@ async def _run_update(cyclo_exe: str) -> None:
|
|
|
50
50
|
except asyncio.TimeoutError:
|
|
51
51
|
_update_status['phase'] = 'error'
|
|
52
52
|
_update_status['error'] = 'cyclo_manager update timed out'
|
|
53
|
+
except Exception as e:
|
|
54
|
+
_update_status['phase'] = 'error'
|
|
55
|
+
_update_status['error'] = f'Failed to start cyclo_manager update: {e}'
|
|
53
56
|
|
|
54
57
|
|
|
55
58
|
@router.post('/update')
|
|
@@ -57,17 +60,12 @@ async def start_update() -> dict:
|
|
|
57
60
|
"""Delegate update to cyclo_manager update, which handles containers and host agent restart."""
|
|
58
61
|
global _update_status
|
|
59
62
|
|
|
60
|
-
cyclo_exe = shutil.which('cyclo_manager')
|
|
61
|
-
if not cyclo_exe:
|
|
62
|
-
raise HTTPException(status_code=status.HTTP_503_SERVICE_UNAVAILABLE,
|
|
63
|
-
detail='cyclo_manager command not found')
|
|
64
|
-
|
|
65
63
|
if _update_status.get('phase') == 'updating':
|
|
66
64
|
raise HTTPException(status_code=status.HTTP_409_CONFLICT,
|
|
67
65
|
detail='Update already in progress')
|
|
68
66
|
|
|
69
67
|
_update_status = {'phase': 'updating', 'output': '', 'error': ''}
|
|
70
|
-
asyncio.create_task(_run_update(
|
|
68
|
+
asyncio.create_task(_run_update())
|
|
71
69
|
return {'status': 'update started'}
|
|
72
70
|
|
|
73
71
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cyclo-manager
|
|
3
|
-
Version: 1.0.0.
|
|
3
|
+
Version: 1.0.0.dev5
|
|
4
4
|
Summary: cyclo_manager CLI: pip-installable launcher for cyclo_manager server and UI containers. Run 'cyclo_manager up' to start Docker stack.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -201,10 +201,10 @@ def _ensure_host_agent() -> int:
|
|
|
201
201
|
|
|
202
202
|
user, user_home = account
|
|
203
203
|
workspace_path = _host_agent_workspace(user, user_home)
|
|
204
|
-
|
|
205
|
-
if not
|
|
204
|
+
agent_exec_start = f'{sys.executable} -m cyclo_host_agent.main' if sys.executable else None
|
|
205
|
+
if not agent_exec_start:
|
|
206
206
|
print(
|
|
207
|
-
'Warning:
|
|
207
|
+
'Warning: Python executable is unknown. '
|
|
208
208
|
'Run `pip install cyclo-manager` and retry.',
|
|
209
209
|
file=sys.stderr,
|
|
210
210
|
)
|
|
@@ -227,7 +227,7 @@ User={user}
|
|
|
227
227
|
Group={user}
|
|
228
228
|
RuntimeDirectory=robotis/agent_sockets/host
|
|
229
229
|
RuntimeDirectoryMode=0755
|
|
230
|
-
ExecStart={
|
|
230
|
+
ExecStart={agent_exec_start}
|
|
231
231
|
Environment=HOME={user_home}
|
|
232
232
|
Environment=CYCLO_HOST_AGENT_WORKSPACE={workspace_path}
|
|
233
233
|
Restart=always
|
|
@@ -491,3 +491,7 @@ def main() -> int:
|
|
|
491
491
|
parser.print_help()
|
|
492
492
|
return 0
|
|
493
493
|
return args.func(args)
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
if __name__ == '__main__':
|
|
497
|
+
raise SystemExit(main())
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cyclo-manager"
|
|
7
|
-
version = "1.0.0.
|
|
7
|
+
version = "1.0.0.dev5"
|
|
8
8
|
description = "cyclo_manager CLI: pip-installable launcher for cyclo_manager server and UI containers. Run 'cyclo_manager up' to start Docker stack."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev5}/cyclo_manager_cli/docker/docker-compose.yml
RENAMED
|
File without changes
|
|
File without changes
|