MCPcopy Create free account
hub / github.com/FSGModding/FSG_Mod_Assistant / #workQueueResponse

Method #workQueueResponse

lib/modCheckLib.js:652–675  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 5

#addModToDataMethod · 0.95
debugMethod · 0.80
infoMethod · 0.80
setModMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected