Skip to content
Snippets Groups Projects
Commit 4c77889a authored by Lennart Kramer's avatar Lennart Kramer
Browse files

use more thorough healthcheck

the old one was just a single print statement, we can at least
try out whether creating files in our work directory works and
that the maxima_tmpdir variable is set
parent bcc2f56e
Branches
No related tags found
No related merge requests found
......@@ -28,6 +28,10 @@ var debug uint
var privilege_drop_channel chan<- ExecutionInfo
const MAXIMA_SPAWN_TIMEOUT = time.Duration(10) * time.Second
const HEALTHCHECK_CMD = `
f: concat(maxima_tempdir, "/test")$
stringout(f, concat("healthcheck ", "successful"))$
printfile(f)$`
type User struct {
Id uint
......@@ -466,7 +470,7 @@ func handler(w http.ResponseWriter, r *http.Request, queue <-chan *ChildProcess,
var timeout uint64
var err error
if health {
input = "print(\"healthcheck successful\");"
input = HEALTHCHECK_CMD
timeout = 1000
debugf("Debug: doing healthcheck")
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment