macOS
FSEvents — backend mặc định
FSEvents — backend mặc định
Watchdog dùng FSEvents trên macOS. Nhanh, nhẹ CPU, nhưng:
- Không hoạt động trên ổ mạng (NFS, sshfs, AFP). Fallback:
--polling. mtimechỉ chính xác đến giây — file copy nhanh có thể có 2 file cùng mtime.
launchd KeepAlive
launchd KeepAlive
Service được install dưới
~/Library/LaunchAgents/com.video-agent.asset-index.plist với KeepAlive=true. Watcher tự bật lại nếu crash.Stop service tạm thời:Gatekeeper chặn .command
Gatekeeper chặn .command
Lần đầu chạy
Install.command, macOS có thể chặn vì script chưa được sign. Workaround:- Finder: chuột phải file → Open → Open trong dialog.
- Hoặc:
xattr -d com.apple.quarantine setup/Install.command.
Apple Silicon (M1/M2/M3)
Apple Silicon (M1/M2/M3)
Tất cả deps (
apsw, sqlite-vec, watchdog) đã có wheel arm64. Nếu lỗi build từ source khi pip install:Windows
ReadDirectoryChangesW debounce dài hơn
ReadDirectoryChangesW debounce dài hơn
Windows fire
on_modified rất nhiều lần khi file đang được copy lớn. Mặc định debounce = 2.5s (so với 1.5s mac). Có thể override bằng --debounce.cp65001 / UTF-8 console
cp65001 / UTF-8 console
setup/Install.bat và setup/Search.bat đã có chcp 65001 để dùng UTF-8 — chữ Việt không bị vỡ. Nếu chạy trực tiếp PowerShell:'cp1252' codec can't encode character → set env trước khi chạy:Long Paths (> 260 ký tự)
Long Paths (> 260 ký tự)
Mặc định Windows giới hạn 260 ký tự cho path. Repo đặt sâu (Desktop, OneDrive…) có thể vượt giới hạn.Bật Long Paths:
gpedit.msc→Computer Configuration→Administrative Templates→System→Filesystem→Enable Win32 long paths= Enabled.- Reboot.
Task Scheduler — ONLOGON trigger
Task Scheduler — ONLOGON trigger
service install tạo task VideoAgentAssetIndex trigger ONLOGON. Watcher chỉ chạy khi user đăng nhập — không chạy ở background console session.Manual control:apsw build lỗi
apsw build lỗi
Một số phiên bản Windows thiếu Hoặc nếu dùng
sqlite3.dll công khai cần cho apsw. Workaround:apsw từ PyPI bị lỗi load extension, đổi sang fork pre-built có bật enable_load_extension.Windows Defender block .bat
Windows Defender block .bat
Defender đôi khi quarantine
setup\Install.bat. Workaround: chuột phải file → Properties → tick Unblock → Apply.Linux
inotify limit
inotify limit
inotify có giới hạn watch count (mặc định 8192 trên Ubuntu). Repo lớn có thể chạm:Tăng:
systemd user service vs system service
systemd user service vs system service
systemctl --user chỉ chạy khi user logged in. Để service tiếp tục sau khi logout:/etc/systemd/system/ thay vì ~/.config/systemd/user/.apsw cần enable_load_extension
apsw cần enable_load_extension
sqlite-vec cần SQLite có extension loading. Default Python sqlite3 không có. apsw mặc định bật, nhưng nếu build từ source bị tắt:NFS / sshfs filesystem
NFS / sshfs filesystem
inotify không hoạt động trên ổ mạng. Dùng polling:Tốn CPU hơn FSEvents/inotify nhưng work everywhere.
SSL / certifi
Trên một số môi trường (Windows enterprise, Linux container minimal), mặc định không có CA bundle → lỗiSSL: CERTIFICATE_VERIFY_FAILED khi gọi OpenAI/Gemini. Set env:
Bước tiếp theo
Mở rộng
Thêm format mới, đổi embed model, custom analyzer.