We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3eece88 commit a4e177bCopy full SHA for a4e177b
nsfwDetection/nsfwProcess.js
@@ -3,8 +3,8 @@ import path from 'path';
3
import os from 'os';
4
5
const nsfwServicePath = path.resolve('nsfwDetection/nsfwService.cjs');
6
-const WORKER_COUNT = os.cpus().length; // Use number of CPU cores
7
-const WORKER_TIMEOUT = 5000; // 5 seconds per request
+const WORKER_COUNT = Math.max(1, os.cpus().length - 1); // Leave 1 core free
+const WORKER_TIMEOUT = 15000; // 5 seconds per request
8
9
let workers = [];
10
let readyWorkers = new Set();
0 commit comments