fix: 软件管理下发/重启/回退超时60秒
This commit is contained in:
@@ -108,18 +108,14 @@ export async function sendNeSoftware(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'post',
|
||||
timeout: 60 * 1000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
|
||||
let rows = result.data.data.affectedRows;
|
||||
if (rows) {
|
||||
delete result.data;
|
||||
return result;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
}
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,18 +127,14 @@ export async function runNeSoftware(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'put',
|
||||
timeout: 60 * 1000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
|
||||
let rows = result.data.data.affectedRows;
|
||||
if (rows) {
|
||||
delete result.data;
|
||||
return result;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
}
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -154,18 +146,14 @@ export async function backNeSoftware(data: Record<string, any>) {
|
||||
const result = await request({
|
||||
url: `/api/rest/systemManagement/v1/${data.neType}/software/${data.version}/${data.neId}`,
|
||||
method: 'patch',
|
||||
timeout: 60 * 1000,
|
||||
});
|
||||
// 解析数据
|
||||
if (result.code === RESULT_CODE_SUCCESS && result.data.data) {
|
||||
let rows = result.data.data.affectedRows;
|
||||
if (rows) {
|
||||
delete result.data;
|
||||
return result;
|
||||
} else {
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
}
|
||||
if (result.code === RESULT_CODE_SUCCESS) {
|
||||
delete result.data;
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
return { code: RESULT_CODE_ERROR, msg: RESULT_MSG_ERROR };
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user