mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
New forum content.json init changed to {}, process priority auto set to 10
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import os from 'os'
|
||||
import { isMainThread, parentPort, workerData } from 'worker_threads'
|
||||
|
||||
import logger from './logger'
|
||||
import {
|
||||
Question,
|
||||
@@ -586,6 +588,9 @@ function doSearch(
|
||||
// ---------------------------------------------------------------------------------------------------------
|
||||
|
||||
if (!isMainThread) {
|
||||
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