mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
worker start msg counts fix
This commit is contained in:
parent
16cd4d9d4b
commit
537f4c413e
1 changed files with 5 additions and 2 deletions
|
@ -693,7 +693,10 @@ function handleWorkerData() {
|
|||
}: { workerIndex: number; initData: Array<QuestionDb> } = workerData
|
||||
let qdbs: Array<QuestionDb> = initData
|
||||
|
||||
const subjCount = initData.length
|
||||
const qdbCount = initData.length
|
||||
const subjCount = initData.reduce((sCount, qdb) => {
|
||||
return sCount + qdb.data.length
|
||||
}, 0)
|
||||
const questionCount = initData.reduce((qCount, qdb) => {
|
||||
return (
|
||||
qCount +
|
||||
|
@ -704,7 +707,7 @@ function handleWorkerData() {
|
|||
}, 0)
|
||||
|
||||
logger.Log(
|
||||
`[THREAD #${workerIndex}]: Worker ${workerIndex} reporting for duty! subjects: ${subjCount}, questions: ${questionCount}`
|
||||
`[THREAD #${workerIndex}]: Worker ${workerIndex} reporting for duty! qdbs: ${qdbCount}, subjects: ${subjCount}, questions: ${questionCount}`
|
||||
)
|
||||
|
||||
parentPort.on('message', async (msg /*: TaskObject */) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue