docs: clarify lifecycle applies to all managed file types, not just video

This commit is contained in:
Accusys
2026-05-15 12:06:44 +08:00
parent d81aec7360
commit e4e3e25170

View File

@@ -6,7 +6,9 @@ author: "M5"
status: "draft"
---
# File Lifecycle — Pre-Processing & Registration
# File Lifecycle — Pre-Processing & Registration (All Managed Files)
> **Applicable to all managed file types**: video, image, document (pdf, docx, pages, key, numbers), spreadsheet, presentation, and any other file registered in the system. The pre-processor registers any file type found by the watcher. ffprobe is used when applicable; files that ffprobe cannot parse receive minimal filesystem metadata as a fallback.
## Metaphor
@@ -76,7 +78,7 @@ Stored alongside other processor outputs:
"birthday": "2026-05-15T02:15:00Z",
"file_uuid": "aeed71342a899fe4b4c57b7d41bcb692",
"file_size": 2147483648,
"file_type": "video",
"file_type": "video | image | document | audio",
"pre_processed_at": "2026-05-15T02:15:05Z"
}
```
@@ -171,11 +173,11 @@ registration_time = NOW()
| # | Task | File |
|---|------|------|
| 1 | Modify watcher pre-processor: SHA256 + probe + write `.pre.json` | `src/watcher/watcher.rs` |
| 1 | Modify watcher pre-processor: SHA256 + probe + write `.pre.json` for all file types | `src/watcher/watcher.rs` |
| 2 | Register: read `.pre.json`, skip SHA256/probe if cached | `src/api/server.rs``register_single_file` |
| 3 | UUID: use `birthday` from `.pre.json` (or `fs::metadata().created()` fallback) | `src/api/server.rs` |
| 4 | INSERT status: `registered`, registration_time: `NOW()` | `src/api/server.rs` |
| 5 | Pre-process all file types (not just video) | `src/watcher/watcher.rs` |
## Version History