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

Merge pull request #364 from sasjs/log-separator

fix(log-separator): log separator should always wrap log
This commit is contained in:
Yury Shkoda
2023-07-25 09:01:36 +03:00
committed by GitHub
5 changed files with 26 additions and 23 deletions

View File

@@ -128,8 +128,10 @@ export class ExecutionController {
// INFO: webout can be a Buffer, that is why it's length should be checked to determine if it is empty // INFO: webout can be a Buffer, that is why it's length should be checked to determine if it is empty
if (webout && webout.length !== 0) resultParts.push(webout) if (webout && webout.length !== 0) resultParts.push(webout)
// INFO: log separator wraps the log from the beginning and the end
resultParts.push(process.logsUUID) resultParts.push(process.logsUUID)
resultParts.push(log) resultParts.push(log)
resultParts.push(process.logsUUID)
if (includePrintOutput && runTime === RunTimeType.SAS) { if (includePrintOutput && runTime === RunTimeType.SAS) {
const printOutputPath = path.join(session.path, 'output.lst') const printOutputPath = path.join(session.path, 'output.lst')
@@ -137,10 +139,7 @@ export class ExecutionController {
? await readFile(printOutputPath) ? await readFile(printOutputPath)
: '' : ''
if (printOutput) { if (printOutput) resultParts.push(printOutput)
resultParts.push(process.logsUUID)
resultParts.push(printOutput)
}
} }
return { return {

View File

@@ -190,17 +190,20 @@ ${autoExecContent}`
} }
private scheduleSessionDestroy(session: Session) { private scheduleSessionDestroy(session: Session) {
setTimeout(async () => { setTimeout(
if (session.inUse) { async () => {
// adding 10 more minutes if (session.inUse) {
const newDeathTimeStamp = parseInt(session.deathTimeStamp) + 10 * 1000 // adding 10 more minutes
session.deathTimeStamp = newDeathTimeStamp.toString() const newDeathTimeStamp = parseInt(session.deathTimeStamp) + 10 * 1000
session.deathTimeStamp = newDeathTimeStamp.toString()
this.scheduleSessionDestroy(session) this.scheduleSessionDestroy(session)
} else { } else {
await this.deleteSession(session) await this.deleteSession(session)
} }
}, parseInt(session.deathTimeStamp) - new Date().getTime() - 100) },
parseInt(session.deathTimeStamp) - new Date().getTime() - 100
)
} }
} }

View File

@@ -3,12 +3,11 @@ import Snackbar from '@mui/material/Snackbar'
import MuiAlert, { AlertProps } from '@mui/material/Alert' import MuiAlert, { AlertProps } from '@mui/material/Alert'
import Slide, { SlideProps } from '@mui/material/Slide' import Slide, { SlideProps } from '@mui/material/Slide'
const Alert = React.forwardRef<HTMLDivElement, AlertProps>(function Alert( const Alert = React.forwardRef<HTMLDivElement, AlertProps>(
props, function Alert(props, ref) {
ref return <MuiAlert elevation={6} ref={ref} variant="filled" {...props} />
) { }
return <MuiAlert elevation={6} ref={ref} variant="filled" {...props} /> )
})
const Transition = (props: SlideProps) => { const Transition = (props: SlideProps) => {
return <Slide {...props} direction="up" /> return <Slide {...props} direction="up" />

View File

@@ -7,8 +7,10 @@
border: none; border: none;
outline: none; outline: none;
transition: 0.4s; transition: 0.4s;
box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 1px -1px, box-shadow:
rgba(0, 0, 0, 0.14) 0px 1px 1px 0px, rgba(0, 0, 0, 0.12) 0px 1px 3px 0px; rgba(0, 0, 0, 0.2) 0px 2px 1px -1px,
rgba(0, 0, 0, 0.14) 0px 1px 1px 0px,
rgba(0, 0, 0, 0.12) 0px 1px 3px 0px;
} }
.ChunkDetails { .ChunkDetails {

View File

@@ -1,4 +1,4 @@
<!DOCTYPE html> <!doctype html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />