This commit is contained in:
aozhiwei 2023-07-12 14:20:28 +08:00
parent 73bf8ddaff
commit 9dd44731b7
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,3 @@
{
"gameapi_url": "https://game2006api-test.kingsome.cn/webapp/index.php"
}

View File

@ -3,6 +3,7 @@ const app = require('j7/app');
const bcutils = require('j7/bcutils');
const utils = require('j7/utils');
const http = require('j7/http');
const config = require('j7/config');
const constant = require('common/constant');
const metaFactory = require('../../../metadata/factory');
@ -105,7 +106,7 @@ class BaseEventProcess {
async callGameApi(params, checkCb) {
while (true) {
try {
const {err, data} = await http.get('',params);
const {err, data} = await http.get(config('gameapi_url'), params);
if (err) {
await utils.sleep(3000 + utils.randRange(500, 1500));
continue;
@ -115,6 +116,7 @@ class BaseEventProcess {
break;
}
} catch (e) {
utils.safeDumpErrStack(e);
log.error(e);
}
await utils.sleep(3000 + utils.randRange(500, 1500));