mirror of
				https://gitlab.com/MrFry/mrfrys-node-server
				synced 2025-04-01 20:24:18 +02:00 
			
		
		
		
	Removed manual nice setting
This commit is contained in:
		| @@ -27,9 +27,9 @@ const isRoot = process.getuid && process.getuid() === 0 | ||||
| const port = isRoot ? 80 : 8080 | ||||
| const httpsport = isRoot ? 443 : 5001 | ||||
|  | ||||
| import os from 'os' | ||||
| os.setPriority(10) | ||||
| console.log(`Process priority set to ${os.getPriority()}`) | ||||
| // import os from 'os' | ||||
| // os.setPriority(10) | ||||
| // console.log(`Process priority set to ${os.getPriority()}`) | ||||
|  | ||||
| import express from 'express' | ||||
| import vhost from 'vhost' | ||||
| @@ -136,9 +136,9 @@ if (!process.env.NS_DEVEL) { | ||||
|       next() | ||||
|     } else { | ||||
|       logger.DebugLog( | ||||
|         `HTTPS ${req.method} redirect to: ${'https://' + | ||||
|           req.headers.host + | ||||
|           req.url}`, | ||||
|         `HTTPS ${req.method} redirect to: ${ | ||||
|           'https://' + req.headers.host + req.url | ||||
|         }`, | ||||
|         'https', | ||||
|         1 | ||||
|       ) | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| import os from 'os' | ||||
| // import os from 'os' | ||||
| import { isMainThread, parentPort, workerData } from 'worker_threads' | ||||
|  | ||||
| import logger from './logger' | ||||
| @@ -588,8 +588,8 @@ function doSearch( | ||||
| // --------------------------------------------------------------------------------------------------------- | ||||
|  | ||||
| if (!isMainThread) { | ||||
|   os.setPriority(10) | ||||
|   logger.Log(`Worker thread priority set to ${os.getPriority()}`) | ||||
|   // os.setPriority(10) | ||||
|   // logger.Log(`Worker thread priority set to ${os.getPriority()}`) | ||||
|  | ||||
|   const { workerIndex } = workerData | ||||
|   let qdbs: Array<QuestionDb> = workerData.initData | ||||
|   | ||||
		Reference in New Issue
	
	Block a user