Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
5263547b
Commit
5263547b
authored
Jan 05, 2022
by
蒋勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
03f7f6c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
zhiquanquan/app/base/utils/execClient.js
+4
-4
No files found.
zhiquanquan/app/base/utils/execClient.js
View file @
5263547b
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment