forked from MapComplete/MapComplete
		
	Scripts(offline): ignore stdout
This commit is contained in:
		
							parent
							
								
									0a3db2d1dc
								
							
						
					
					
						commit
						34ca5c47d5
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
					@ -6,7 +6,7 @@ import { spawn } from "child_process"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function startProcess(script: string): Promise<void> {
 | 
					function startProcess(script: string): Promise<void> {
 | 
				
			||||||
    return new Promise((resolve, reject) => {
 | 
					    return new Promise((resolve, reject) => {
 | 
				
			||||||
        const child = spawn("node", [script], { stdio: "inherit" })
 | 
					        const child = spawn("node", [script], { stdio: "ignore" })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        child.on("close", (code) => {
 | 
					        child.on("close", (code) => {
 | 
				
			||||||
            if (code === 0) resolve()
 | 
					            if (code === 0) resolve()
 | 
				
			||||||
| 
						 | 
					@ -72,6 +72,7 @@ class GeneratePmTilesExtracts extends Script {
 | 
				
			||||||
        do {
 | 
					        do {
 | 
				
			||||||
            batch = this.createBatch(generator, numberOfThreads)
 | 
					            batch = this.createBatch(generator, numberOfThreads)
 | 
				
			||||||
            await Promise.all(batch)
 | 
					            await Promise.all(batch)
 | 
				
			||||||
 | 
					            console.log("Completed", numberOfThreads, "processes")
 | 
				
			||||||
        } while (batch.length > 0)
 | 
					        } while (batch.length > 0)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue