|
@@ -286,6 +286,7 @@ async function runJkesRecord(opts) {
|
|
|
const s = getJkesSettings()
|
|
const s = getJkesSettings()
|
|
|
const {
|
|
const {
|
|
|
token,
|
|
token,
|
|
|
|
|
+ recordDbId,
|
|
|
pathPoints: rawPoints,
|
|
pathPoints: rawPoints,
|
|
|
distanceM,
|
|
distanceM,
|
|
|
paceSecPerKm,
|
|
paceSecPerKm,
|
|
@@ -400,7 +401,7 @@ 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 })
|
|
|
|
|
|
|
+ await Redis.set(jkesRedisKeys.lepaoSchedule(recordDbId), 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) {
|
|
@@ -413,6 +414,7 @@ async function runJkesRecord(opts) {
|
|
|
await postJson(`/health/runRecord/pause/${recordId}`, {})
|
|
await postJson(`/health/runRecord/pause/${recordId}`, {})
|
|
|
const endJson = await postJson(`/health/runRecord/end/${recordId}`, {})
|
|
const endJson = await postJson(`/health/runRecord/end/${recordId}`, {})
|
|
|
log(`ID:${recordId} 跑步已结束`)
|
|
log(`ID:${recordId} 跑步已结束`)
|
|
|
|
|
+ await Redis.del(jkesRedisKeys.lepaoSchedule(recordId))
|
|
|
return { recordId, endJson, runStartMs, uploadedPayloadPoints }
|
|
return { recordId, endJson, runStartMs, uploadedPayloadPoints }
|
|
|
}
|
|
}
|
|
|
|
|
|