fix: sync cleanup_ttl_hours to transcode_settings table on provider save
This commit is contained in:
@@ -168,6 +168,15 @@ async fn rebuild_registry(state: &AppState) -> DomainResult<()> {
|
||||
Arc::new(infra::LocalFilesProvider::new(Arc::clone(&idx), lf_cfg, tm.clone())),
|
||||
);
|
||||
|
||||
// Sync cleanup_ttl_hours to transcode_settings table so
|
||||
// GET /files/transcode-settings returns the configured value.
|
||||
let _ = sqlx::query(
|
||||
"UPDATE transcode_settings SET cleanup_ttl_hours = ? WHERE id = 1",
|
||||
)
|
||||
.bind(cleanup_ttl_hours as i64)
|
||||
.execute(&sqlite_pool)
|
||||
.await;
|
||||
|
||||
*state.local_index.write().await = Some(idx);
|
||||
*state.transcode_manager.write().await = tm;
|
||||
*state.sqlite_pool.write().await = Some(sqlite_pool);
|
||||
|
||||
Reference in New Issue
Block a user