Reels pre-gen: use DEFAULT_MAX_SEGMENTS so cache keys match on-demand
pregen_one hardcoded max_segments: 24 while create_reel_handler defaults to DEFAULT_MAX_SEGMENTS (40). Since the cache key encodes the raw max_segments, the pre-generated reel's key never matched the client's on-demand request, so POST /reels cache-hit an older max=40 reel and the agentic pre-gen file was left orphaned. Align to DEFAULT_MAX_SEGMENTS (as the plan specified) so the on-demand cache-hit path serves the pre-gen reel. Content is unchanged — the actual beat count is duration-budgeted either way; only the key descriptor differed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+5
-1
@@ -1053,7 +1053,11 @@ async fn pregen_one(
|
||||
} else {
|
||||
Some(library.to_string())
|
||||
},
|
||||
max_segments: 24,
|
||||
// Must match the on-demand default (create_reel_handler) so the cache
|
||||
// key — which encodes the raw max_segments — lines up and the on-demand
|
||||
// cache-hit path serves this pre-generated reel. The client sends no
|
||||
// max_segments, so it defaults to DEFAULT_MAX_SEGMENTS there too.
|
||||
max_segments: selector::DEFAULT_MAX_SEGMENTS,
|
||||
};
|
||||
|
||||
let exif_dao = app_state.insight_generator.exif_dao();
|
||||
|
||||
Reference in New Issue
Block a user