Inspect fewer files: skip later volumes under random stems
Of 5,000 waiting inspection jobs, 3,212 were queued only because their stem looked random, and 2,044 of those were later RAR volumes (xyz.part47.rar, .r00) or par2 recovery volumes (.vol03+04.par2). Their first segment adds nothing: the set is listed from its first volume and named from its index .par2, as for readable names already. Each one cost a ~700 KB download; inspection pulled ~85 MB/s and fell behind the backfill. - isCandidate() rejects later volumes (isLaterVolume) before the random- name rule. - worker:file only queues files that are candidates, so the ~30% that inspection skips anyway no longer take queue slots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2178847513
commit
95f1d427df
5 files changed
+33
-3
No files matched your search
@@ -8,6 +8,7 @@ import SfvService from '#services/SfvService'
|
||||
import queueConfig from '#config/queue'
|
||||
import Shutdown from '#services/Shutdown'
|
||||
import QueueService from '#services/QueueService'
|
||||
import ContentService from '#services/ContentService'
|
||||
|
||||
export default class FileWorker extends BaseCommand {
|
||||
public static commandName = 'worker:file'
|
||||
@@ -94,7 +95,10 @@ export default class FileWorker extends BaseCommand {
|
||||
date: binary.posted_at ? new Date(binary.posted_at).getTime() : null,
|
||||
release_id: binary.release_id,
|
||||
})
|
||||
await collectionQueue.add('process-collection', { fileId }, { jobId: `file-${fileId}` })
|
||||
// Files inspection would skip anyway (later volumes, readable media names) don't take a queue slot.
|
||||
if (ContentService.isCandidate(binary.name)) {
|
||||
await collectionQueue.add('process-collection', { fileId }, { jobId: `file-${fileId}` })
|
||||
}
|
||||
}, {
|
||||
connection: queueConfig.connection,
|
||||
// One job at a time could not keep up with the backfill (130k waiting); jobs are per binary and
|
||||
|
||||
Reference in new issue
Block a user