Health Check
Description
Solution
Health Check 1
"/new": {
"post": {
"summary": "Create Problem",
"description": "**This endpoint is only for admin. Do NOT share this link with players!**\n\nUpload the health check script to create a new problem. The uploaded file should be a zip file.\nThe zip file should NOT have a top-level folder. In the folder, you must place an executable (or a script) named `run`. You may put other files as you want.\nBelow is an example output of `zipinfo myzip.zip` of a valid `myzip.zip`:\n\n```\nArchive: myzip.zip\nZip file size: 383 bytes, number of entries: 2\n-rwxrwxr-x 3.0 unx 84 tx defN 22-Aug-20 19:53 run\n-rw-rw-r-- 3.0 unx 8 tx stor 22-Aug-20 19:53 my-env\n2 files, 92 bytes uncompressed, 89 bytes compressed: 3.3%\n```\n\nBelow is an example output of an invalid zip (because it has a top-level folder):\n\n```\nArchive: badzip.zip\nZip file size: 553 bytes, number of entries: 3\ndrwxrwxr-x 3.0 unx 0 bx stor 22-Aug-20 19:55 badzip/\n-rw-rw-r-- 3.0 unx 8 tx stor 22-Aug-20 19:55 badzip/myenv\n-rwxrwxr-x 3.0 unx 84 tx defN 22-Aug-20 19:55 badzip/run\n3 files, 92 bytes uncompressed, 89 bytes compressed: 3.3%\n```\n\nEvery 30 seconds, the server will spawn a new process, cd into your folder, and run `./run`. Your `./run` should create `./status.json` to store the health check result, which will be returned when the players request for the status of this problem.\nIf you have any question, please contact @chiffoncake.",
"operationId": "create_problem_new_post",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"$ref": "#/components/schemas/Body_create_problem_new_post"
}
}
},
"required": true
},
...Health Check 2

Last updated