fix: logging never fails a job, one backup retention, first copy after the upgrade
Owner review 2, phase 2 review findings (scheduler core). - Log.Write caught only IOException. Microsoft.Extensions.Logging wraps provider failures in an AggregateException, so a log line that could not be written (in tests: the process-wide sink of a stopped server whose log folder was gone) escaped JobEngine.RunAsync's catch before the failure was stored: the job stayed running and the worker faulted. This was the cause of the intermittent JobApiTests/ArchiveModuleTests failures. Log.Write now drops any non-fatal sink failure, TeeLogSink keeps a line from the other sinks, FileLogSink drops a line it cannot write and reopens the file at the next one, and LoggerSink drops what the providers throw. The scheduler's loop relies on the same guarantee. - The daily backup loop (RunDailyAsync, IsDue, Interval, CheckInterval) had no caller since the index-backup schedule replaced it; it is removed and the DatabaseBackups summary describes the schedule. - The first copy after the upgrade no longer waits a day (or for 03:00): SystemSchedule.LastDone seeds a new row due at once when its work was last done a period or more before, and both hosts pass the newest copy in the backups folder for index-backup. - Back up now (Settings and Archive), the copy kept before a restore and a backup job that keeps fewer prune to the largest Copies kept of the backup schedules (DatabaseBackups.KeptAsync), not a fixed three. The four tooltips that promised three daily copies are reworded (en, it) and their stale translations deleted. - New tests for the scheduler loop itself: a tick, Wake, a pass that threw, and dispose during a pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit c5ad0c4c3f636129afe5dd1ce039185516da5621)
This commit is contained in:
1 parent
422f33d5f3
commit
e384564784
59 files changed
+668
-264
No files matched your search
@@ -21,7 +21,6 @@
|
||||
<data name="Tooltips.Archive.Availability.Offline" xml:space="preserve"><value>Không thể truy cập thư mục kho lưu trữ; chỉ mục giữ nguyên như lần truy cập gần nhất</value></data>
|
||||
<data name="Tooltips.Archive.Availability.Online" xml:space="preserve"><value>Thư mục kho lưu trữ có thể truy cập và cho phép ghi</value></data>
|
||||
<data name="Tooltips.Archive.Availability.ReadOnly" xml:space="preserve"><value>Đọc được nhưng không ghi được: chỉ duyệt xem</value></data>
|
||||
<data name="Tooltips.Archive.Backup" xml:space="preserve"><value>Ghi một bản sao nhất quán của cơ sở dữ liệu chỉ mục vào thư mục sao lưu; giữ lại ba bản gần nhất</value></data>
|
||||
<data name="Tooltips.Archive.Cameras" xml:space="preserve"><value>Ảnh theo máy ảnh; các máy ít ảnh nhất được gộp lại</value></data>
|
||||
<data name="Tooltips.Archive.CancelSearch" xml:space="preserve"><value>Dừng tìm kiếm; không có gì thay đổi</value></data>
|
||||
<data name="Tooltips.Archive.ClearFilter" xml:space="preserve"><value>Hiển thị lại mọi chuỗi ảnh của vùng chọn</value></data>
|
||||
@@ -72,7 +71,6 @@
|
||||
<data name="Tooltips.Archive.RebuildStart" xml:space="preserve"><value>Đưa việc dựng lại vào hàng đợi · kho lưu trữ vẫn dùng được trong lúc đó</value></data>
|
||||
<data name="Tooltips.Archive.Relink" xml:space="preserve"><value>Chọn thư mục mới của kho lưu trữ bạn đã di chuyển; các chuỗi ảnh của nó sẽ đi theo</value></data>
|
||||
<data name="Tooltips.Archive.RenameApply" xml:space="preserve"><value>Thực hiện đúng các thay đổi này với thư mục, sidecar và chỉ mục · tiếp tục được sau sự cố</value></data>
|
||||
<data name="Tooltips.Archive.Restore" xml:space="preserve"><value>Chọn một bản sao lưu hằng ngày của chỉ mục trong Cài đặt › Nâng cao; bản đó sẽ thay thế chỉ mục ở lần khởi động tiếp theo</value></data>
|
||||
<data name="Tooltips.Archive.RetagApply" xml:space="preserve"><value>Thay đổi nhãn của các chuỗi ảnh này trong sidecar và chỉ mục</value></data>
|
||||
<data name="Tooltips.Archive.Retry" xml:space="preserve"><value>Chạy lại cùng thao tác đó</value></data>
|
||||
<data name="Tooltips.Archive.Scan" xml:space="preserve"><value>Quét tăng dần: tệp mới, đã thay đổi và đã bị xóa theo thời gian sửa đổi và kích thước</value></data>
|
||||
@@ -539,8 +537,6 @@
|
||||
<data name="Tooltips.Settings.AnalysisWidth" xml:space="preserve"><value>Cạnh dài lớn nhất khi giải mã khung hình để phân tích sâu (một nửa kích thước gốc, tối đa đến giá trị này); rộng hơn thì chậm hơn nhưng thấy chi tiết mịn hơn</value></data>
|
||||
<data name="Tooltips.Settings.ArchiveFree" xml:space="preserve"><value>Dung lượng trống trên ổ đĩa kho lưu trữ</value></data>
|
||||
<data name="Tooltips.Settings.ArchiveRoot" xml:space="preserve"><value>Thư mục gốc của kho lưu trữ cục bộ; tệp không bị di chuyển · Enter để áp dụng, Esc để hoàn tác</value></data>
|
||||
<data name="Tooltips.Settings.Backup" xml:space="preserve"><value>Sao chép chỉ mục vào thư mục sao lưu; giữ lại ba bản mới nhất · mất vài giây</value></data>
|
||||
<data name="Tooltips.Settings.Backups" xml:space="preserve"><value>Các bản sao hằng ngày của chỉ mục (giữ lại ba bản mới nhất); hãy chọn bản muốn quay về</value></data>
|
||||
<data name="Tooltips.Settings.BrowseArchive" xml:space="preserve"><value>Chọn thư mục kho lưu trữ</value></data>
|
||||
<data name="Tooltips.Settings.BrowseCache" xml:space="preserve"><value>Chọn thư mục bộ nhớ đệm; nên dùng SSD nhanh</value></data>
|
||||
<data name="Tooltips.Settings.CacheFolder" xml:space="preserve"><value>Nơi chứa khung hình tràn ra và hình thu nhỏ; nên dùng SSD nhanh · Enter để áp dụng, Esc để hoàn tác</value></data>
|
||||
|
||||
Reference in new issue
Block a user