Commit ce7a5a9c by 张云飞

zyf

parent a5ba4cfc
......@@ -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]);
}
}
}
......
......@@ -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.execPost3({}, 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]);
}
}
}
......
......@@ -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) {
......
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