From 6531b6b7aabc03ee338bd05f827a9355acabc0d3 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Thu, 14 Nov 2024 11:49:54 -0500 Subject: [PATCH] Update `cpu` types --- tljh/config_schema.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tljh/config_schema.py b/tljh/config_schema.py index 0b12c8f..e6fb820 100644 --- a/tljh/config_schema.py +++ b/tljh/config_schema.py @@ -79,7 +79,23 @@ config_schema = { "description": "User CPU and memory limits.", "type": "object", "additionalProperties": False, - "properties": {"memory": {"type": "string"}, "cpu": {"type": "integer"}}, + "properties": {"memory": {"type": "string"}, "cpu": { + "oneOf": [ + { + "type": "integer", + "minimum": 0 + }, + { + "type": "number", + "minimum": 0 + }, + { + "type": "string", + "enum": ["None"] + } + ] + } + }, }, "UserEnvironment": { "type": "object",