feat: 添加多个可视化编辑schema

This commit is contained in:
Junyan Qin
2024-10-16 15:34:30 +08:00
parent 18cce189a4
commit a313ae5f97
14 changed files with 547 additions and 13 deletions

View File

@@ -60,7 +60,9 @@ class Controller:
# 通知其他协程,有新的请求可以处理了
self.ap.query_pool.condition.notify_all()
asyncio.create_task(_process_query(selected_query))
task = asyncio.create_task(_process_query(selected_query))
self.ap.asyncio_tasks.append(task)
except Exception as e:
# traceback.print_exc()
self.ap.logger.error(f"控制器循环出错: {e}")

View File

@@ -19,7 +19,10 @@ class SendResponseBackStage(stage.PipelineStage):
async def process(self, query: core_entities.Query, stage_inst_name: str) -> entities.StageProcessResult:
"""处理
"""
random_delay = random.uniform(*self.ap.platform_cfg.data['force-delay'])
random_range = (self.ap.platform_cfg.data['force-delay']['min'], self.ap.platform_cfg.data['force-delay']['max'])
random_delay = random.uniform(*random_range)
self.ap.logger.debug(
"根据规则强制延迟回复: %s s",