|
@@ -5,6 +5,8 @@
|
|
|
*/
|
|
*/
|
|
|
const axios = require('axios')
|
|
const axios = require('axios')
|
|
|
const https = require('https')
|
|
const https = require('https')
|
|
|
|
|
+const Redis = require('../DataBase/Redis.js')
|
|
|
|
|
+const jkesRedisKeys = require('./redisKeys.js')
|
|
|
|
|
|
|
|
const { getJkesSettings, normalizeApiBase } = require('./jkesSettings')
|
|
const { getJkesSettings, normalizeApiBase } = require('./jkesSettings')
|
|
|
const {
|
|
const {
|
|
@@ -398,6 +400,8 @@ async function runJkesRecord(opts) {
|
|
|
|
|
|
|
|
await flushCalcThroughDeviceTime(tEnd)
|
|
await flushCalcThroughDeviceTime(tEnd)
|
|
|
|
|
|
|
|
|
|
+ await Redis.set(jkesRedisKeys.lepaoSchedule(recordId), JSON.stringify({current: c, total: chunks.length}), { EX: 60 * 60 * 3 })
|
|
|
|
|
+
|
|
|
const intraMs = Math.max(0, tEnd - tStart)
|
|
const intraMs = Math.max(0, tEnd - tStart)
|
|
|
if (intraMs > 0) {
|
|
if (intraMs > 0) {
|
|
|
await sleep(intraMs)
|
|
await sleep(intraMs)
|