处理数据量大情况,分割数据到临时文件,然后通过服务把文件逐一读取入库

  • 解决多线程同时操作导致数据库死锁
  • value表示最新数据存储的路径
  • mkey表示执行入库的模块
{
  "scheduler": {
    "quartz-job-monitor-last-db": {
      //全局配置
      "globalParameter": {
        "ownerId": "idc",
        "shredRule": "Day",
        "shredType": "table",
        "shreding": true,
        "shredColumn": "rl_id"
      },
      "dirPhyRoot": "~/Config/Scheduler/idc",
      "title": "监控采集(db)",
      //服务过程提示信息
      "msg": {
        "start": "【监控采集(db)】{0:yyyy/MM/dd HH:mm:ss}服务启动中",
        "error": "【监控采集(db)】{0:yyyy/MM/dd HH:mm:ss}服务启动失败",
        "success": "【监控采集(db)】{0:yyyy/MM/dd HH:mm:ss}服务启动成功",
        "process": "【监控采集(db)】{0:yyyy/MM/dd HH:mm:ss},操作时间{1}s,下次执行时间{2:yyyy/MM/dd HH:mm:ss},入库{3}条",
        "processError": "【监控采集(db)】{0:yyyy/MM/dd HH:mm:ss},异常说明:{2}"
      },
      //数据库连接名
      "connName": "ConnIdc",
      "enabled": true,
      "cahceMinutes": 1440,
      //当前时间多长后执行服务
      "seconds": 120,
      //同步的开始当前时间向后推的分钟数
      "startMinutes": 6,
      //同步的开始当前时间未来的分钟数
      "endMinutes": 0,
      //查询条件差值
      "utcSearchHour": 0,
      //数据条件差值
      "utcDataHour": 0,
      //任务调度执行信息
      "job": {
        "name": "quartz-job-monitor-last-db",
        "group": "quartz-group-idc",
        //"withIntervalInSeconds": 310,
        "withIntervalInSeconds": 310
      },
      "bulk": {
        "doMethod": "db"
      },
      //响应结果数据
      "responseFromData": [
        {
          "sortId": 1,
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-config.json",
          "mkey": "quartz-job-monitor-last-config"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-console.json",
          "sortId": 5,
          "mkey": "quartz-job-monitor-last-console"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-params_121.json",
          "sortId": 10,
          "mkey": "quartz-job-monitor-last-params_121"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-params_122.json",
          "sortId": 15,
          "mkey": "quartz-job-monitor-last-params_122"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-params_123.json",
          "sortId": 20,
          "mkey": "quartz-job-monitor-last-params_123"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-params_124.json",
          "sortId": 25,
          "mkey": "quartz-job-monitor-last-params_124"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-params_125.json",
          "sortId": 30,
          "mkey": "quartz-job-monitor-last-params_125"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-space.json",
          "sortId": 35,
          "mkey": "quartz-job-monitor-last-space"
        },
        {
          "value": "~/App_Data/idc/Scheduler/ResponseDataLzy/quartz-job-monitor-lzy-status.json",
          "sortId": 40,
          "mkey": "quartz-job-monitor-last-status"
        }
      ]
    }
  }
}
文档更新时间: 2021-08-22 08:00   作者:admin