model-compose 0.2.8__tar.gz → 0.2.9__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.
- {model_compose-0.2.8/src/model_compose.egg-info → model_compose-0.2.9}/PKG-INFO +1 -1
- {model_compose-0.2.8 → model_compose-0.2.9}/pyproject.toml +1 -1
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/webui/webui.py +1 -2
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/logger/services/console.py +2 -1
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/time.py +10 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/job/impl/action.py +3 -3
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/job/impl/delay.py +5 -7
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/workflow.py +8 -5
- {model_compose-0.2.8 → model_compose-0.2.9/src/model_compose.egg-info}/PKG-INFO +1 -1
- {model_compose-0.2.8 → model_compose-0.2.9}/LICENSE +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/README.md +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/setup.cfg +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/cli/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/cli/compose.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/base.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/component.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/context.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/http_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/http_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/mcp_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/mcp_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/shell.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/workflow.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/compose/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/compose/compose.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/compose/manager.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/base.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/controller.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/runner/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/runner/client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/runner/http_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/runner/mcp_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/runner/runner.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/services/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/services/http_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/services/mcp_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/webui/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/webui/gradio.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/gateway/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/gateway/base.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/gateway/gateway.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/gateway/services/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/gateway/services/http_tunnel.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/gateway/services/ssh_tunnel.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/listener/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/listener/base.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/listener/listener.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/listener/services/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/listener/services/http_callback.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/logger/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/logger/base.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/logger/logger.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/logger/logging.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/logger/services/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/logger/services/file.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/runtime/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/runtime/env.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/services/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/services/async_service.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/expiring.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/http_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/http_request.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/http_status.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/image.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/mcp_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/renderer.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/ssh_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/streaming.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/utils/workqueue.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/context.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/job/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/job/base.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/job/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/job/job.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/workflow/schema.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/loader.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/action.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/http_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/http_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/mcp_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/mcp_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/shell.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/workflow.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/component.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/http_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/http_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/mcp_client.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/mcp_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/shell.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/types.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/workflow.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/compose.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/controller.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/http_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/mcp_server.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/types.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/webui.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/gateway.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/impl/http_tunnel.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/impl/ssh_tunnel.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/impl/types.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/job/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/job/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/job/impl/action.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/job/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/job/impl/delay.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/job/impl/types.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/job/job.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/listener/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/listener/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/listener/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/listener/impl/http_callback.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/listener/impl/types.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/listener/listener.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/logger/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/logger/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/logger/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/logger/impl/console.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/logger/impl/file.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/logger/impl/types.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/logger/logger.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/runtime/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/runtime/impl/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/runtime/impl/common.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/runtime/impl/docker.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/runtime/impl/types.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/runtime/runtime.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/utils/__init__.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/utils/annotation.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/workflow.py +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/model_compose.egg-info/SOURCES.txt +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/model_compose.egg-info/dependency_links.txt +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/model_compose.egg-info/entry_points.txt +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/model_compose.egg-info/requires.txt +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/src/model_compose.egg-info/top_level.txt +0 -0
- {model_compose-0.2.8 → model_compose-0.2.9}/tests/test_cli.py +0 -0
|
@@ -6,9 +6,8 @@ from mindor.core.controller.runner import ControllerRunner
|
|
|
6
6
|
from mindor.core.workflow.schema import create_workflow_schema
|
|
7
7
|
from mindor.core.services import AsyncService
|
|
8
8
|
from .gradio import GradioWebUIBuilder
|
|
9
|
-
|
|
10
|
-
from fastapi import FastAPI
|
|
11
9
|
from gradio import mount_gradio_app
|
|
10
|
+
from fastapi import FastAPI
|
|
12
11
|
import uvicorn, gradio
|
|
13
12
|
|
|
14
13
|
class ControllerWebUI(AsyncService):
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Iterator, Any
|
|
2
2
|
from mindor.dsl.schema.logger import ConsoleLoggerConfig
|
|
3
3
|
from ..base import LoggerService, LoggerType, LoggingLevel, register_logger
|
|
4
|
+
from uvicorn.logging import ColourizedFormatter
|
|
4
5
|
import logging
|
|
5
6
|
|
|
6
7
|
_level_map = {
|
|
@@ -17,7 +18,7 @@ class ConsoleLogger(LoggerService):
|
|
|
17
18
|
super().__init__(id, config, daemon)
|
|
18
19
|
|
|
19
20
|
self.logger: logging.Logger = logging.getLogger(id)
|
|
20
|
-
self.formatter: logging.Formatter =
|
|
21
|
+
self.formatter: logging.Formatter = ColourizedFormatter("%(levelprefix)s %(message)s")
|
|
21
22
|
self.handler: logging.StreamHandler = None
|
|
22
23
|
|
|
23
24
|
self._configure_logger()
|
|
@@ -2,6 +2,16 @@ from typing import Union, Optional
|
|
|
2
2
|
from datetime import timedelta, datetime
|
|
3
3
|
import zoneinfo
|
|
4
4
|
|
|
5
|
+
class TimeTracker:
|
|
6
|
+
def __init__(self):
|
|
7
|
+
self._start = datetime.now()
|
|
8
|
+
|
|
9
|
+
def elapsed(self) -> float:
|
|
10
|
+
return (datetime.now() - self._start).total_seconds()
|
|
11
|
+
|
|
12
|
+
def reset(self) -> None:
|
|
13
|
+
self._start = datetime.now()
|
|
14
|
+
|
|
5
15
|
def parse_duration(value: Union[str, float, int]) -> timedelta:
|
|
6
16
|
if isinstance(value, (float, int)):
|
|
7
17
|
return timedelta(seconds=value)
|
|
@@ -2,6 +2,7 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
|
|
|
2
2
|
from mindor.dsl.schema.job import ActionJobConfig, JobType
|
|
3
3
|
from mindor.dsl.schema.component import ComponentConfig
|
|
4
4
|
from mindor.core.component import ComponentService, ComponentGlobalConfigs, ComponentResolver, create_component
|
|
5
|
+
from mindor.core.utils.time import TimeTracker
|
|
5
6
|
from mindor.core.logger import logging
|
|
6
7
|
from ..base import Job, JobType, WorkflowContext, register_job
|
|
7
8
|
from datetime import datetime
|
|
@@ -24,14 +25,13 @@ class ActionJob(Job):
|
|
|
24
25
|
async def _run_once():
|
|
25
26
|
run_id: str = ulid.ulid()
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
job_time_tracker = TimeTracker()
|
|
28
29
|
logging.debug("[task-%s] Action 'run-%s' started for job '%s'", context.task_id, run_id, self.id)
|
|
29
30
|
|
|
30
31
|
output = await component.run(await context.render_variable(self.config.action), run_id, input)
|
|
31
32
|
context.register_source("output", output)
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
logging.debug("[task-%s] Action 'run-%s' completed in %.2f seconds.", context.task_id, run_id, elapsed)
|
|
34
|
+
logging.debug("[task-%s] Action 'run-%s' completed in %.2f seconds.", context.task_id, run_id, job_time_tracker.elapsed())
|
|
35
35
|
|
|
36
36
|
output = (await context.render_variable(self.config.output, ignore_files=True)) if self.config.output else output
|
|
37
37
|
outputs.append(output)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annotated, Callable, Any
|
|
2
2
|
from mindor.dsl.schema.job import DelayJobConfig, DelayJobMode
|
|
3
3
|
from mindor.dsl.schema.component import ComponentConfig
|
|
4
|
-
from mindor.core.utils.time import parse_duration, parse_datetime
|
|
4
|
+
from mindor.core.utils.time import parse_duration, parse_datetime, TimeTracker
|
|
5
5
|
from mindor.core.logger import logging
|
|
6
6
|
from ..base import Job, JobType, WorkflowContext, register_job
|
|
7
7
|
from datetime import datetime, timedelta
|
|
@@ -25,14 +25,13 @@ class DelayJob(Job):
|
|
|
25
25
|
duration = parse_duration((await context.render_variable(self.config.duration)) or 0.0)
|
|
26
26
|
duration = duration.total_seconds()
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
job_time_tracker = TimeTracker()
|
|
29
29
|
logging.debug("[task-%s] Delay started for time interval: %d seconds.", context.task_id, int(duration))
|
|
30
30
|
|
|
31
31
|
if duration > 0.0:
|
|
32
32
|
await asyncio.sleep(duration)
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
logging.debug("[task-%s] Delay completed in %.2f seconds.", context.task_id, elapsed)
|
|
34
|
+
logging.debug("[task-%s] Delay completed in %.2f seconds.", context.task_id, job_time_tracker.elapsed())
|
|
36
35
|
|
|
37
36
|
return None
|
|
38
37
|
|
|
@@ -43,13 +42,12 @@ class DelayJob(Job):
|
|
|
43
42
|
now = datetime.now(tz=time.tzinfo)
|
|
44
43
|
duration = max((time - now).total_seconds(), 0.0)
|
|
45
44
|
|
|
46
|
-
|
|
45
|
+
job_time_tracker = TimeTracker()
|
|
47
46
|
logging.debug("[task-%s] Delay started, waiting until %s", context.task_id, time)
|
|
48
47
|
|
|
49
48
|
if duration > 0.0:
|
|
50
49
|
await asyncio.sleep(duration)
|
|
51
50
|
|
|
52
|
-
|
|
53
|
-
logging.debug("[task-%s] Delay completed in %.2f seconds.", context.task_id, elapsed)
|
|
51
|
+
logging.debug("[task-%s] Delay completed in %.2f seconds.", context.task_id, job_time_tracker.elapsed())
|
|
54
52
|
|
|
55
53
|
return None
|
|
@@ -2,6 +2,7 @@ from typing import Type, Union, Literal, Optional, Dict, List, Tuple, Set, Annot
|
|
|
2
2
|
from mindor.dsl.schema.workflow import WorkflowConfig, JobConfig
|
|
3
3
|
from mindor.dsl.schema.component import ComponentConfig
|
|
4
4
|
from mindor.core.component import ComponentGlobalConfigs
|
|
5
|
+
from mindor.core.utils.time import TimeTracker
|
|
5
6
|
from mindor.core.logger import logging
|
|
6
7
|
from .context import WorkflowContext
|
|
7
8
|
from .job import Job, create_job
|
|
@@ -86,9 +87,10 @@ class WorkflowRunner:
|
|
|
86
87
|
running_job_ids: Set[str] = set()
|
|
87
88
|
completed_job_ids: Set[str] = set()
|
|
88
89
|
scheduled_job_tasks: Dict[str, asyncio.Task] = {}
|
|
90
|
+
job_time_trackers: Dict[str, TimeTracker] = {}
|
|
89
91
|
output: Any = None
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
workflow_time_tracker = TimeTracker()
|
|
92
94
|
logging.info("[task-%s] Workflow '%s' started.", context.task_id, self.id)
|
|
93
95
|
|
|
94
96
|
while pending_jobs:
|
|
@@ -96,10 +98,12 @@ class WorkflowRunner:
|
|
|
96
98
|
|
|
97
99
|
for job in runnable_jobs:
|
|
98
100
|
if job.id not in scheduled_job_tasks:
|
|
99
|
-
logging.debug("[task-%s] Scheduling job: '%s'", context.task_id, job.id)
|
|
100
101
|
scheduled_job_tasks[job.id] = asyncio.create_task(job.run(context))
|
|
101
102
|
running_job_ids.add(job.id)
|
|
102
103
|
|
|
104
|
+
job_time_trackers[job.id] = TimeTracker()
|
|
105
|
+
logging.info("[task-%s] Job '%s' started.", context.task_id, job.id)
|
|
106
|
+
|
|
103
107
|
if not scheduled_job_tasks:
|
|
104
108
|
raise RuntimeError("No runnable jobs but pending jobs remain.")
|
|
105
109
|
|
|
@@ -111,7 +115,7 @@ class WorkflowRunner:
|
|
|
111
115
|
completed_job_output = await completed_job_task
|
|
112
116
|
context.complete_job(completed_job_id, completed_job_output)
|
|
113
117
|
|
|
114
|
-
logging.info("[task-%s] Job '%s' completed.", context.task_id, completed_job_id)
|
|
118
|
+
logging.info("[task-%s] Job '%s' completed in %.2f seconds.", context.task_id, completed_job_id, job_time_trackers[completed_job_id].elapsed())
|
|
115
119
|
|
|
116
120
|
if self._is_terminal_job(completed_job_id):
|
|
117
121
|
if isinstance(output, dict) and isinstance(completed_job_output, dict):
|
|
@@ -124,8 +128,7 @@ class WorkflowRunner:
|
|
|
124
128
|
del pending_jobs[completed_job_id]
|
|
125
129
|
del scheduled_job_tasks[completed_job_id]
|
|
126
130
|
|
|
127
|
-
|
|
128
|
-
logging.info("[task-%s] Workflow '%s' completed in %.2f seconds.", context.task_id, self.id, elapsed)
|
|
131
|
+
logging.info("[task-%s] Workflow '%s' completed in %.2f seconds.", context.task_id, self.id, workflow_time_tracker.elapsed())
|
|
129
132
|
|
|
130
133
|
return output
|
|
131
134
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/http_client.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/http_server.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/mcp_client.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/component/services/mcp_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/runner/http_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/services/http_server.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/controller/services/mcp_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/core/listener/services/http_callback.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/http_client.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/action/impl/http_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/http_client.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/http_server.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/mcp_client.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/mcp_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/component/impl/workflow.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/http_server.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/controller/impl/mcp_server.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/impl/http_tunnel.py
RENAMED
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/gateway/impl/ssh_tunnel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model_compose-0.2.8 → model_compose-0.2.9}/src/mindor/dsl/schema/listener/impl/http_callback.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|