mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-03 11:11:10 +00:00
Serializes media library scans through a scan queue
Replaces the job queue with a scan queue that executes one media library scan at a time, in the order in which the scans were queued, so several libraries requested at once no longer run one complete job chain each on the thread pool shared with the web server. Keeps queued scans Pending and cancellable, reports them as queued, and cancels the executing scan and the queued ones when the user cancels all scans. A media library type without a scanner now fails its own scan instead of leaving it stuck Pending, without stopping the scans queued behind it. Makes the file system discovery job the only top level job of a scan graph, so awaiting it completes the whole scan, and leaves one logical processor free for the rest of the process while discovery and hashing read files in parallel. Removes the per job Task.Run wrappers, links the scan cancellation with the host shutdown token in the scan processor, updates the ADR amendments, API documentation, manual, web client and tests, and normalizes the comments of the touched files.
This commit is contained in:
1 parent
b0c24a1722
commit
8ff5149b6e
85 files changed
+2559
-1394
No files matched your search
+1
-1
@@ -19,7 +19,7 @@ public class ScanLibrariesEndpointSummary : Summary<ScanLibrariesEndpoint, Empty
|
||||
public ScanLibrariesEndpointSummary()
|
||||
{
|
||||
Summary = "Triggers the scan of all media libraries.";
|
||||
Description = "Starts the scanning process of all media libraries of a user, or all libraries, if the user is an Admin.";
|
||||
Description = "Queues the scanning process of all media libraries of a user, or all libraries if the user is an Admin. The scans run one at a time, in the order in which they were queued.";
|
||||
|
||||
Response(200, "The media libraries scan was successfully started.",
|
||||
example: new MediaLibraryScanResponse[] {
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ public class ScanLibraryEndpointSummary : Summary<ScanLibraryEndpoint, ScanLibra
|
||||
public ScanLibraryEndpointSummary()
|
||||
{
|
||||
Summary = "Triggers the scan of a media library.";
|
||||
Description = "Starts the scanning process of a media library of a user.";
|
||||
Description = "Queues the scanning process of a media library of a user. Queued scans run one at a time.";
|
||||
|
||||
ExampleRequest = new ScanLibraryRequest(
|
||||
Id: Guid.NewGuid()
|
||||
|
||||
Reference in new issue
Block a user