From b02b4ecf8a9f105810167c957901cf4b9af51589 Mon Sep 17 00:00:00 2001 From: Antti Leinonen Date: Fri, 12 Jan 2024 15:35:31 +0200 Subject: [PATCH] Fix bug and add gb to payload's memory field --- app/models/remote_sandbox.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/remote_sandbox.rb b/app/models/remote_sandbox.rb index ac8d0e6d1..3049596fa 100644 --- a/app/models/remote_sandbox.rb +++ b/app/models/remote_sandbox.rb @@ -77,7 +77,7 @@ def send_submission(submission, notify_url) file: tar_file, notify: notify_url, token: submission.secret_token, submission_id: submission.id } payload[:docker_image] = exercise.docker_image if exercise.docker_image - payload[:memory_limit] = exercise.memory_limit if exercise.memory_limit + payload[:memory_limit_gb] = exercise.memory_limit_gb if exercise.memory_limit_gb payload[:cpu_limit] = exercise.cpu_limit if exercise.cpu_limit RestClient::Request.execute(method: :post, url: post_url, timeout: 5, payload: payload)