cyclo-manager 1.0.0.dev3__tar.gz → 1.0.0.dev4__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.dev4}/PKG-INFO +1 -1
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_host_agent/routers/update.py +7 -9
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager.egg-info/PKG-INFO +1 -1
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager_cli/cli.py +4 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/pyproject.toml +1 -1
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/README.md +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_host_agent/__init__.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_host_agent/main.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_host_agent/models.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_host_agent/routers/__init__.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_host_agent/routers/repos.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager.egg-info/SOURCES.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager.egg-info/dependency_links.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager.egg-info/entry_points.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager.egg-info/requires.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager.egg-info/top_level.txt +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager_cli/__init__.py +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager_cli/config/config.yml +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/cyclo_manager_cli/docker/docker-compose.yml +0 -0
- {cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/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.dev4
|
|
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.dev4
|
|
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
|
|
@@ -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.dev4"
|
|
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.dev4}/cyclo_manager.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{cyclo_manager-1.0.0.dev3 → cyclo_manager-1.0.0.dev4}/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.dev4}/cyclo_manager_cli/docker/docker-compose.yml
RENAMED
|
File without changes
|
|
File without changes
|