mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-08-12 13:50:59 +00:00
refactor: switch pipeline_cfg related fields to new pipeline config
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user