refactor: switch pipeline_cfg related fields to new pipeline config

This commit is contained in:
Junyan Qin
2025-04-03 17:57:51 +08:00
parent 472d472bc1
commit 7f66efcdd5
13 changed files with 62 additions and 38 deletions
+3 -1
View File
@@ -20,7 +20,7 @@ class RateLimit(stage.PipelineStage):
async def initialize(self, pipeline_config: dict):
algo_name = self.ap.pipeline_cfg.data['rate-limit']['algo']
algo_name = 'fixwin'
algo_class = None
@@ -46,6 +46,7 @@ class RateLimit(stage.PipelineStage):
"""
if stage_inst_name == "RequireRateLimitOccupancy":
if await self.algo.require_access(
query,
query.launcher_type.value,
query.launcher_id,
):
@@ -62,6 +63,7 @@ class RateLimit(stage.PipelineStage):
)
elif stage_inst_name == "ReleaseRateLimitOccupancy":
await self.algo.release_access(
query,
query.launcher_type.value,
query.launcher_id,
)