Commit 75708ebb by 蒋勇

Merge branch 'taskexecutor' of gitlab.gongsibao.com:jiangyong/zhichan into taskexecutor

parents 8159666a 32a57493
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class Tasktm2fq extends TaskBase {
constructor() {
super(TaskBase.getServiceName(Tasktm2fq));
this.restclient = system.getObject("util.restClient");
this.fqbossUrl = settings.fqbossUrl();
}
async beforeTask(params) {
console.log("前置操作......", this.serviceName);
//this.isThrough=true;
//console.log(this.cacheManager);
}
async subDoTask() {
console.log("--------------");
console.log("TestTask1.....");
var obj = {
"actionType": "Taskalitmupdate",
"actionBody": {
"limit": 100 //推送数据条数 默认100条
}
}
try {
var url = this.fqbossUrl + "web/tmInfoPusherCtl/pushInfo";
var rtn = await this.restclient.execPost(obj, url);
console.log(rtn);
return rtn;
} catch (error) {
console.log(error);
return null;
}
}
}
module.exports = Tasktm2fq;
\ No newline at end of file
......@@ -50,6 +50,13 @@ var settings = {
return "http://center-channel-service.chaolai/";
}
},
fqbossUrl: function () {
if (this.env == "dev") {
return "http://192.168.0.106:4012/";
} else {
return "http://fqboss-service.chaolai/";
}
},
reqTransferurl: function () {
if (this.env == "dev") {
return "http://192.168.18.61:3003/";
......
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