(m)
| 650 | } |
| 651 | |
| 652 | #workQueueResponse(m) { |
| 653 | if ( Object.hasOwn(m, 'type') ) { |
| 654 | switch (m.type) { |
| 655 | case 'log' : |
| 656 | this.#log[m.level](`worker-thread-${m.pid}`, m.data.join(' ')) |
| 657 | break |
| 658 | case 'modRecord' : |
| 659 | for ( const logLine of m.logLines.items ) { |
| 660 | this.#log[logLine[0]](m.logLines.group, logLine[1]) |
| 661 | } |
| 662 | this.#log.debug(`worker-thread-${m.pid}`, `Sent(got) modRecord :: ${m.collectKey}--${m.modRecord.fileDetail.shortName}`) |
| 663 | this.#addModToData(m.collectKey, m.modRecord) |
| 664 | |
| 665 | if ( m.modRecord.md5Sum !== null && !m.modRecord.canNotUse ) { |
| 666 | this.#log.info(`mod-${m.modRecord.uuid}`, 'Adding mod to cache') |
| 667 | this.#list_newMods.add(m.modRecord.uuid) |
| 668 | this.#modCache.setMod(m.modRecord.md5Sum, m.modRecord) |
| 669 | } |
| 670 | break |
| 671 | default : |
| 672 | break |
| 673 | } |
| 674 | } |
| 675 | } |
| 676 | |
| 677 | #workQueueDone(_, idx) { |
| 678 | this.#threadPoolIdx.delete(idx) |
nothing calls this directly
no test coverage detected