fix: 统一算法参数
- confirm_seconds 默认值改为 5 秒 - 同步 default_params 中的默认值为 5
This commit is contained in:
@@ -178,7 +178,7 @@ class IntrusionAlgorithm:
|
||||
def __init__(
|
||||
self,
|
||||
cooldown_seconds: int = 120,
|
||||
confirm_seconds: int = 3,
|
||||
confirm_seconds: int = 5,
|
||||
target_class: Optional[str] = None,
|
||||
):
|
||||
self.cooldown_seconds = cooldown_seconds
|
||||
@@ -274,7 +274,7 @@ class AlgorithmManager:
|
||||
},
|
||||
"intrusion": {
|
||||
"cooldown_seconds": 120,
|
||||
"confirm_seconds": 3,
|
||||
"confirm_seconds": 5,
|
||||
"target_class": None,
|
||||
},
|
||||
}
|
||||
@@ -307,7 +307,7 @@ class AlgorithmManager:
|
||||
elif algorithm_type == "intrusion":
|
||||
self.algorithms[roi_id]["intrusion"] = IntrusionAlgorithm(
|
||||
cooldown_seconds=algo_params.get("cooldown_seconds", 120),
|
||||
confirm_seconds=algo_params.get("confirm_seconds", 3),
|
||||
confirm_seconds=algo_params.get("confirm_seconds", 5),
|
||||
target_class=algo_params.get("target_class"),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user