Commit 5263547b by 蒋勇

d

parent 03f7f6c2
...@@ -17,7 +17,9 @@ class ExecClient { ...@@ -17,7 +17,9 @@ class ExecClient {
async exec(cmd) { async exec(cmd) {
//await后面表达式返回的promise对象,是then的语法糖,await返回then函数的返回值 //await后面表达式返回的promise对象,是then的语法糖,await返回then函数的返回值
//异常需要try/catch自己捕获或外部catch捕获 //异常需要try/catch自己捕获或外部catch捕获
const {stdout, stderr} = await exec(cmd); const {stdout, stderr} = await exec(cmd,{
maxBuffer: 1024 * 1024 * 50
});
return {stdout, stderr}; return {stdout, stderr};
} }
...@@ -36,9 +38,7 @@ class ExecClient { ...@@ -36,9 +38,7 @@ class ExecClient {
async execPost(subData, url) { async execPost(subData, url) {
let cmd = this.FetchPostCmd(subData, url); let cmd = this.FetchPostCmd(subData, url);
var result = await this.exec(cmd,{ var result = await this.exec(cmd);
maxBuffer: 1024 * 1024 * 50
});
return result; return result;
} }
async execPostEs(subData, url) { async execPostEs(subData, url) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment