diff --git a/app/question_gen/pipeline_v2.py b/app/question_gen/pipeline_v2.py index faec0bf..26ae198 100644 --- a/app/question_gen/pipeline_v2.py +++ b/app/question_gen/pipeline_v2.py @@ -330,7 +330,7 @@ async def _process_one_slot( 返回: GeneratedQuestion(通过全部检查)或 None(重出耗尽)。 """ - _RESAMPLE_VIDEO_INTERVAL = 1 + resample_video_interval = 1 async with sem: strategy = get_strategy(slot.task_type) @@ -341,8 +341,8 @@ async def _process_one_slot( current_video_id = slot.video_id for attempt in range(1, config.retry_limit + 1): - # 连续失败 _RESAMPLE_VIDEO_INTERVAL 次后换视频 - if attempt > 1 and (attempt - 1) % _RESAMPLE_VIDEO_INTERVAL == 0 and all_trees: + # 连续失败 resample_video_interval 次后换视频 + if attempt > 1 and (attempt - 1) % resample_video_interval == 0 and all_trees: alt_ids = [v for v in all_trees if v != current_video_id] if alt_ids: current_video_id = rng.choice(alt_ids)