//tag规则 release-v188.2.*
//fqboss定时任务
const TaskBase = require("../../task.base");
const system = require("../../../system");
var settings = require("../../../../config/settings");
class TaskPushPublicService extends TaskBase {
  constructor() {
    super(TaskBase.getServiceName(TaskPushPublicService));
    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": "taskpolicyneed2fq",
      "actionBody": {
        "limit": 100 //推送数据条数 默认100条
      }
    }
    try {
      var url = settings.centerChannelUrl() + "api/auth/taskapi/taskPushPublicService";
      this.restclient.execPost(obj, url);//取消异步
      return {};
    } catch (error) {
      console.log(error);
      return null;
    }
  }
}
module.exports = TaskPushPublicService;


// var a=new AliicapiTask();
// a.subDoTask();