Commit 7d7b1524 by 王悦

fix 批量推fq单条错误

parent 91d985d6
...@@ -21,6 +21,7 @@ class GatewaypushlogService extends ServiceBase { ...@@ -21,6 +21,7 @@ class GatewaypushlogService extends ServiceBase {
} }
var self = this; var self = this;
for (var i = 0; i < count; i++) { for (var i = 0; i < count; i++) {
try {
var icloginfo = icloginfos[i]; var icloginfo = icloginfos[i];
var requestdata = null; var requestdata = null;
if (icloginfo && icloginfo.requestjson) { if (icloginfo && icloginfo.requestjson) {
...@@ -29,11 +30,7 @@ class GatewaypushlogService extends ServiceBase { ...@@ -29,11 +30,7 @@ class GatewaypushlogService extends ServiceBase {
var url = settings.gatewayUrl() + "action/intentionapi/springBoard"; var url = settings.gatewayUrl() + "action/intentionapi/springBoard";
var rtn = await self.execClient.execPost(requestdata, url); var rtn = await self.execClient.execPost(requestdata, url);
var data = rtn var data = rtn
try {
data = JSON.parse(rtn.stdout); data = JSON.parse(rtn.stdout);
}catch (e) {
console.error(e)
}
if (data.success) { if (data.success) {
icloginfo.pushStatus = "yts"; icloginfo.pushStatus = "yts";
} else { } else {
...@@ -45,6 +42,9 @@ class GatewaypushlogService extends ServiceBase { ...@@ -45,6 +42,9 @@ class GatewaypushlogService extends ServiceBase {
icloginfo.pushtimes += 1; icloginfo.pushtimes += 1;
} }
await this.update(icloginfo); await this.update(icloginfo);
}catch (e) {
console.error(e)
}
} }
} }
return system.getResultSuccess(); return system.getResultSuccess();
......
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