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
ce7a5a9c
Commit
ce7a5a9c
authored
Jul 04, 2020
by
张云飞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zyf
parent
a5ba4cfc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
22 deletions
+18
-22
center-taskexecutor/app/base/db/task/ic/icZipTask.js
+7
-8
center-taskexecutor/app/base/db/task/icp/icpGenerateTask.js
+11
-11
center-taskexecutor/app/base/utils/restClient.js
+0
-3
No files found.
center-taskexecutor/app/base/db/task/ic/icZipTask.js
View file @
ce7a5a9c
...
...
@@ -145,7 +145,6 @@ class IcZipTask extends TaskBase {
// "xappkey": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJvcnpaWmhXRXBKNVVFZzRZUU5uUmlyVEJXa1FQbnZ6UyIsImlhdCI6MTU5MjcwOTYzNn0.TWk_F6Tz3fRMqspoG24VSt5RiC4ldFembFYcLcAbowE"
// };
// var res = await this.execClient.execPostTimeOutByBusiness("icZipTask.js/subBeforeTask", resultJson, icUpMaterialurl, null, headData);
console
.
log
(
res
,
"......res..........."
);
}
}
catch
(
error
)
{
continue
;
...
...
@@ -160,13 +159,13 @@ class IcZipTask extends TaskBase {
var
id_dir
=
'/tmp/ic/'
+
Id
;
//压缩包
var
id_zip
=
id_dir
+
'.zip'
;
//
if (fs.existsSync(id_dir)) {
//
// delete
//
child_process.spawn('rm', ['-r', id_dir]);
//
}
//
if (fs.existsSync(id_zip)) {
//
child_process.spawn('rm', [id_zip]);
//
}
if
(
fs
.
existsSync
(
id_dir
))
{
// delete
child_process
.
spawn
(
'rm'
,
[
'-r'
,
id_dir
]);
}
if
(
fs
.
existsSync
(
id_zip
))
{
child_process
.
spawn
(
'rm'
,
[
id_zip
]);
}
}
}
...
...
center-taskexecutor/app/base/db/task/icp/icpGenerateTask.js
View file @
ce7a5a9c
...
...
@@ -28,7 +28,7 @@ class IcpGenerateTask extends TaskBase {
try
{
var
icpGetMaterialurl
=
this
.
icpMaterialurl
+
'/web/delivery/materialCtl/waitGenerate'
;
console
.
log
(
icpGetMaterialurl
);
var
rtn
=
await
this
.
restclient
.
execPost
({},
icpGetMaterialurl
);
var
rtn
=
await
this
.
restclient
.
execPost
3
({},
icpGetMaterialurl
);
if
(
!
rtn
||
!
rtn
.
stdout
)
{
return
;
}
...
...
@@ -685,9 +685,9 @@ class IcpGenerateTask extends TaskBase {
if
(
getParam
)
{
resultJson
.
url
=
'http://'
+
getParam
;
console
.
log
(
resultJson
);
//
var icpUpMaterialurl = this.icpMaterialurl + '/web/delivery/materialCtl/updateUrl';
var
icpUpMaterialurl
=
this
.
icpMaterialurl
+
'/web/delivery/materialCtl/updateUrl'
;
// //请求返回接口,传输上传接口
// await this.restclient.execPost
(resultJson, icpUpMaterialurl);
await
this
.
restclient
.
execPost3
(
resultJson
,
icpUpMaterialurl
);
}
}
catch
(
error
)
{
...
...
@@ -707,14 +707,14 @@ class IcpGenerateTask extends TaskBase {
var
id_dir
=
'/tmp/icp/'
+
Id
;
//压缩包
var
id_zip
=
id_dir
+
'.zip'
;
//
if (fs.existsSync(id_dir)) {
//
// delete
//
child_process.spawn('rm', ['-r', id_dir]);
//
}
//
if (fs.existsSync(id_zip)) {
//
child_process.spawn('rm', [id_zip]);
//
}
if
(
fs
.
existsSync
(
id_dir
))
{
// delete
child_process
.
spawn
(
'rm'
,
[
'-r'
,
id_dir
]);
}
if
(
fs
.
existsSync
(
id_zip
))
{
child_process
.
spawn
(
'rm'
,
[
id_zip
]);
}
}
}
...
...
center-taskexecutor/app/base/utils/restClient.js
View file @
ce7a5a9c
...
...
@@ -122,11 +122,8 @@ class RestClient {
return
result
;
}
async
execPost3
(
subData
,
url
)
{
// console.log("subData-----------------" + JSON.stringify(subData));
let
cmd
=
this
.
FetchPostCmd3
(
subData
,
url
);
console
.
log
(
cmd
,
"...............cmd3...................."
);
var
result
=
await
this
.
exec
(
cmd
);
// console.log(result,"...............cmd3........result............");
return
result
;
}
async
execGet3
(
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