mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Domain specific data files
This commit is contained in:
parent
81577ad621
commit
f87e165084
9 changed files with 174 additions and 71 deletions
|
@ -509,11 +509,11 @@ if (!isMainThread) {
|
|||
const index = msg.index
|
||||
const searchIn = msg.data.searchIn
|
||||
|
||||
console.log(
|
||||
`[THREAD #${workerIndex}]: staring work${
|
||||
!isNaN(index) ? ` on job index #${index}` : ''
|
||||
}`
|
||||
)
|
||||
// console.log(
|
||||
// `[THREAD #${workerIndex}]: staring work${
|
||||
// !isNaN(index) ? ` on job index #${index}` : ''
|
||||
// }`
|
||||
// )
|
||||
|
||||
let searchResult = []
|
||||
|
||||
|
@ -549,18 +549,21 @@ if (!isMainThread) {
|
|||
result: sortedResult,
|
||||
})
|
||||
|
||||
console.log(
|
||||
`[THREAD #${workerIndex}]: Work ${
|
||||
!isNaN(index) ? `#${index}` : ''
|
||||
}done!`
|
||||
)
|
||||
// console.log(
|
||||
// `[THREAD #${workerIndex}]: Work ${
|
||||
// !isNaN(index) ? `#${index}` : ''
|
||||
// }done!`
|
||||
// )
|
||||
} else if (msg.type === 'update') {
|
||||
qdbs = msg.qdbs
|
||||
console.log(`[THREAD #${workerIndex}]: update`)
|
||||
// console.log(`[THREAD #${workerIndex}]: update`)
|
||||
} else if (msg.type === 'newdb') {
|
||||
qdbs.push(msg.newdb)
|
||||
// console.log(`[THREAD #${workerIndex}]: newdb`)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('[THREAD]: Main thread!')
|
||||
// console.log('[THREAD]: Main thread!')
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue