//tag规则 release-v188.17.*
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class ZhugeSyncDataTask extends TaskBase {
    constructor() {
        super(TaskBase.getServiceName(ZhugeSyncDataTask));
        this.restclient = system.getObject("util.restClient");
    }
    /**
     * 每隔10分钟检查一次
     * @param {*} taskName
     */
    formatedTaskName (taskName) {
        console.log("formatedTaskName", taskName)
        return taskName + "|i|5"
    }
    async subDoTask () {
        console.log("--------------");
        console.log("TestTask1.....");
        var obj = {
            "actionType": "synchronizeStatisticDataByZhugeIO",
            "actionBody": {
            }
        }
        try {
            var url = settings.zhugeioUrl() + "/external/action/zhugeio/springBoard";
            this.restclient.execPostpannong(obj, url,"1c685f63-4adb-4d7f-ba57-41eaf76f2f78");
            return system.getResultSuccess();
        } catch (error) {
            console.log(error);
            return null;
        }
    }
}

module.exports = ZhugeSyncDataTask;
