19 lines
874 B
Python
19 lines
874 B
Python
|
|
"""定时任务调度限界上下文。
|
|||
|
|
|
|||
|
|
本包采用轻量六边形架构(Ports & Adapters):
|
|||
|
|
|
|||
|
|
- ``core/``:数据类 + 端口定义 + 校验函数,不依赖任何外部
|
|||
|
|
- ``use_cases/``:用例编排 + DTO + Mapper + Context 构建,依赖 ``core/``
|
|||
|
|
- ``framework/``:调度引擎、handler 注册表、执行器等框架实现,依赖 ``core/`` 端口
|
|||
|
|
- ``adapters/``:实现端口(persistence / messaging 等),依赖 ``core/`` 端口
|
|||
|
|
- ``infrastructure/``:配置、容器装配等基础设施
|
|||
|
|
|
|||
|
|
异常层次定义在包根目录 ``scheduler/exceptions.py``(非 ``core/`` 下),
|
|||
|
|
因为异常被所有层共享(core / use_cases / framework / adapters)。
|
|||
|
|
|
|||
|
|
注:scheduler 不需要 adapter discovery,故本包不提供注册函数;
|
|||
|
|
适配器装配由 ``infrastructure/container.py`` 显式完成。
|
|||
|
|
"""
|
|||
|
|
|
|||
|
|
from __future__ import annotations
|