22 lines
517 B
Python
22 lines
517 B
Python
from __future__ import annotations
|
||
|
||
from abc import ABC, abstractmethod
|
||
from typing import Any
|
||
|
||
|
||
class BaseJob(ABC):
|
||
"""
|
||
插件 Job 基类:框架层只负责加载与调度。
|
||
|
||
- params: 来自 Job.public_cfg(明文 JSON)
|
||
- secrets: 来自 Job.secret_cfg 解密后的明文 dict(仅在内存中存在)
|
||
"""
|
||
|
||
job_id: str | None = None
|
||
|
||
@abstractmethod
|
||
def run(self, params: dict[str, Any], secrets: dict[str, Any]) -> dict[str, Any] | None:
|
||
raise NotImplementedError
|
||
|
||
|