1
0
mirror of https://github.com/sasjs/server.git synced 2026-01-15 18:00:05 +00:00

chore(lint): fixed code style issue

This commit is contained in:
Yury
2024-10-31 10:08:34 +03:00
parent 6b6546c7ad
commit 4f6f735f5b

View File

@@ -202,7 +202,8 @@ ${autoExecContent}`
} }
private scheduleSessionDestroy(session: Session) { private scheduleSessionDestroy(session: Session) {
setTimeout(async () => { setTimeout(
async () => {
if (session.state === SessionState.running) { if (session.state === SessionState.running) {
// adding 10 more minutes // adding 10 more minutes
const newDeathTimeStamp = const newDeathTimeStamp =
@@ -217,7 +218,8 @@ ${autoExecContent}`
if (expiresAfterMins && session.state !== SessionState.completed) { if (expiresAfterMins && session.state !== SessionState.completed) {
// calculate session death time using expiresAfterMins // calculate session death time using expiresAfterMins
const newDeathTimeStamp = const newDeathTimeStamp =
parseInt(session.deathTimeStamp) + expiresAfterMins.mins * 60 * 1000 parseInt(session.deathTimeStamp) +
expiresAfterMins.mins * 60 * 1000
session.deathTimeStamp = newDeathTimeStamp.toString() session.deathTimeStamp = newDeathTimeStamp.toString()
// set expiresAfterMins to true to avoid using it again // set expiresAfterMins to true to avoid using it again
@@ -228,7 +230,9 @@ ${autoExecContent}`
await this.deleteSession(session) await this.deleteSession(session)
} }
} }
}, parseInt(session.deathTimeStamp) - new Date().getTime() - 100) },
parseInt(session.deathTimeStamp) - new Date().getTime() - 100
)
} }
} }