Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 限制产生的无头镀铬工艺的数量_Javascript_Google Chrome_Google Chrome Headless - Fatal编程技术网

Javascript 限制产生的无头镀铬工艺的数量

Javascript 限制产生的无头镀铬工艺的数量,javascript,google-chrome,google-chrome-headless,Javascript,Google Chrome,Google Chrome Headless,我一直在使用chrome launcher和chrome remote interface从JS呈现的页面生成静态图像,如下所示: chromeLauncher.launch({ chromeFlags: [ '--window-size=1020,720', '--disable-gpu', '--headless' ] }).then(async function({port}) { const client = awa

我一直在使用
chrome launcher
chrome remote interface
从JS呈现的页面生成静态图像,如下所示:

chromeLauncher.launch({
    chromeFlags: [
        '--window-size=1020,720',
        '--disable-gpu',
        '--headless'
    ]
}).then(async function({port}) {
    const client = await CDP({port})   
    ...
})
它工作得很好,但这是对传入http请求的响应,我不想产生无限的色度。我如何才能最好地跟踪和限制生成的进程数,记住这是一个每次都重新运行的独立节点脚本