Expose process counter
This commit is contained in:
parent
9cf8dddf1a
commit
762b704a5b
2 changed files with 9 additions and 2 deletions
|
|
@ -237,7 +237,7 @@ const isReady = () =>
|
|||
}
|
||||
})
|
||||
|
||||
let procID = 0
|
||||
let procCounter = 0
|
||||
|
||||
let killed = false
|
||||
|
||||
|
|
@ -245,7 +245,7 @@ const forge = async () => {
|
|||
if (killed) {
|
||||
throw new Error('Tried to forge after killing GunSmith')
|
||||
}
|
||||
logger.info(`Forging Gun # ${++procID}`)
|
||||
logger.info(`Forging Gun # ${++procCounter}`)
|
||||
if (isForging) {
|
||||
throw new Error('Double forge?')
|
||||
}
|
||||
|
|
@ -623,6 +623,9 @@ function createReplica(path, afterMap = false) {
|
|||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
_getProcCounter() {
|
||||
return procCounter
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,10 @@ namespace Smith {
|
|||
* @throws
|
||||
*/
|
||||
pPut(data: GunT.ValidDataValue): Promise<void>
|
||||
/**
|
||||
* @protected
|
||||
*/
|
||||
_getProcCounter(): number
|
||||
}
|
||||
|
||||
export type UserSmithNode = GunSmithNode & GunT.UserGUNNode
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue