mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
json schema json file checking, p2p fixes
This commit is contained in:
parent
5c22f575dd
commit
2edc87d5dd
7 changed files with 277 additions and 75 deletions
|
@ -96,7 +96,8 @@ interface DoneEvent extends EventEmitter {
|
|||
emit(event: 'done', res: WorkerResult): boolean
|
||||
}
|
||||
|
||||
const alertOnPendingCount = 100
|
||||
export const defaultAlertOnPendingCount = 100
|
||||
let alertOnPendingCount = defaultAlertOnPendingCount
|
||||
const workerFile = './src/utils/classes.ts'
|
||||
let workers: Array<WorkerObj>
|
||||
let getInitData: () => Array<QuestionDb> = null
|
||||
|
@ -137,6 +138,12 @@ export function msgAllWorker(data: TaskObject): Promise<WorkerResult[]> {
|
|||
})
|
||||
}
|
||||
|
||||
export function setPendingJobsAlertCount(newVal?: number): void {
|
||||
const count = newVal != null ? newVal : defaultAlertOnPendingCount
|
||||
logger.DebugLog('setPendingJobsAlertCount: ' + count, 'job', 1)
|
||||
alertOnPendingCount = count
|
||||
}
|
||||
|
||||
export function doALongTask(
|
||||
obj: TaskObject,
|
||||
targetWorkerIndex?: number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue