Commit c3178714 authored by 姜登's avatar 姜登

timeout

parent 38866059
Pipeline #5869 passed with stage
in 4 seconds
......@@ -24,7 +24,7 @@ class PartnerService extends Service {
}
const ret = await ctx.curl(`${host + fetchTheme}`, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
method: 'GET',
data: {
......@@ -54,7 +54,7 @@ class PartnerService extends Service {
}
const ret = await ctx.curl(`${host + fetchInfo}`, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
method: 'GET',
data: {
......@@ -85,7 +85,7 @@ class PartnerService extends Service {
const url = `${host + fetchScripts}/${appKey}`;
const ret = await ctx.curl(url, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
method: 'GET',
});
......@@ -109,7 +109,7 @@ class PartnerService extends Service {
const url = `${host + fetchAgreements}/${id}`;
const ret = await ctx.curl(url, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
method: 'GET',
});
......@@ -126,7 +126,7 @@ class PartnerService extends Service {
if (notifyUrl && notice !== '1') {
const ret = await ctx.curl(notifyUrl, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
contentType: 'json',
method: 'POST',
data: {
......
......@@ -32,7 +32,7 @@ class ScriptsService extends Service {
}
const result = await ctx.curl(baseURL + fetchScriptsUrl, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -56,7 +56,7 @@ class ScriptsService extends Service {
}
const result = await ctx.curl(baseURL + fetchOneScriptUrl + '/' + scriptId, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -82,7 +82,7 @@ class ScriptsService extends Service {
const result = await ctx.curl(baseURL + fetchParamsInfoUrl, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -97,7 +97,7 @@ class ScriptsService extends Service {
const { baseURL, scriptsAPI: { fetchHelpUrl }, ctx } = this;
const result = await ctx.curl(baseURL + fetchHelpUrl + '/' + scriptId, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -108,7 +108,7 @@ class ScriptsService extends Service {
const { baseURL, scriptsAPI: { fetchQueryButtonUrl }, ctx } = this;
const result = await ctx.curl(baseURL + fetchQueryButtonUrl + '/' + scriptId, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -119,7 +119,7 @@ class ScriptsService extends Service {
const { baseURL, scriptsAPI: { fetchNoticeUrl }, ctx } = this;
const result = await ctx.curl(baseURL + fetchNoticeUrl + '/' + scriptId, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -130,7 +130,7 @@ class ScriptsService extends Service {
const { baseURL, scriptsAPI: { fetchHubSeriptsUrl }, ctx } = this;
const result = await ctx.curl(baseURL + fetchHubSeriptsUrl + '/' + hubId + '/scripts', {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -143,7 +143,7 @@ class ScriptsService extends Service {
const url = `https://api.map.baidu.com/location/ip?ak=3TBenWOhPygtFFazaR5kSibU&ip=${ip}`;
const result = await ctx.curl(url, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -158,7 +158,7 @@ class ScriptsService extends Service {
const { baseURL, scriptsAPI: { fetchScriptByCityNameUrl }, ctx } = this;
const result = await ctx.curl(baseURL + fetchScriptByCityNameUrl + '?name=' + encodeURIComponent(name) + '&type=query', {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
});
......@@ -188,7 +188,7 @@ class ScriptsService extends Service {
const { cityListUrl, ctx } = this;
const result = await ctx.curl(cityListUrl, {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
contentType: 'json',
method: 'POST',
......
......@@ -23,7 +23,7 @@ class SignatureService extends Service {
url = `${baseURL}${url}`;
opts = {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
...opts,
};
......
......@@ -19,7 +19,7 @@ class StorageService extends Service {
url = `${baseURL}${url}`;
opts = {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
...opts,
};
......
......@@ -18,7 +18,7 @@ class TaskService extends Service {
url = `${baseURL}${url}`;
opts = {
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
...opts,
};
......
......@@ -16,7 +16,7 @@ class WashDataService extends Service {
const washData = await app.curl(washUrl,
{
charset: 'utf-8',
timeout: ['30s', '30s'],
timeout: [30000, 30000],
dataType: 'json',
data: rawdata,
method: 'post',
......
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