Skip to content

Commit

Permalink
Clear time id in dag
Browse files Browse the repository at this point in the history
  • Loading branch information
lynn-illumio committed Oct 3, 2022
1 parent 7782c5d commit fcfe28f
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ export default defineComponent({
getLogs(logTimer)
}

var getLogsID: number

const getLogs = (logTimer: number) => {
const { state } = useAsyncState(
queryLog({
Expand All @@ -256,11 +258,16 @@ export default defineComponent({
getLogs(logTimer)
} else {
nodeVariables.logLoadingRef = false
setTimeout(() => {
nodeVariables.limit += 1000
nodeVariables.skipLineNum += 1000
getLogs(logTimer)
}, logTimer * 1000)
if (logTimer !== 0) {
if (typeof getLogsID === 'number') {
clearTimeout(getLogsID)
}
getLogsID = setTimeout(() => {
nodeVariables.limit += 1000
nodeVariables.skipLineNum += 1000
getLogs(logTimer)
}, logTimer * 1000)
}
}
}),
{}
Expand Down

0 comments on commit fcfe28f

Please sign in to comment.