mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-28 19:47:41 +08:00
v2.2.9
- 资源包升级以提升安全性 - 优化了页面数据刷新机制 注意:本次升级后会默认清理一次种子识别缓存
This commit is contained in:
+21
-2
@@ -1,6 +1,25 @@
|
||||
class BaseAction:
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
from pydantic.main import BaseModel
|
||||
|
||||
from app.schemas import ActionContext
|
||||
|
||||
|
||||
class BaseAction(BaseModel, ABC):
|
||||
"""
|
||||
工作流动作基类
|
||||
"""
|
||||
async def execute(self, params: dict, context: dict) -> dict:
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def name(self) -> str:
|
||||
pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def description(self) -> str:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def execute(self, params: dict, context: ActionContext) -> ActionContext:
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user