Enables cgroup support for isolate
All checks were successful
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 56s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Successful in 1m7s
All checks were successful
Build and Push Docker Images / build (src/LiquidCode.Tester.Gateway/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-gateway-roman, gateway) (push) Successful in 56s
Build and Push Docker Images / build (src/LiquidCode.Tester.Worker/Dockerfile, git.nullptr.top/liquidcode/liquidcode-tester-worker-roman, worker) (push) Successful in 1m7s
Configures isolate to use cgroups for improved resource management. Adds the `--cg` flag to the isolate init and cleanup commands, leveraging cgroups for better resource isolation during code execution testing. Makes isolate configuration file explicit.
This commit is contained in:
@@ -24,7 +24,7 @@ public class IsolateService
|
||||
{
|
||||
_logger.LogDebug("Initializing isolate box {BoxId}", boxId);
|
||||
|
||||
var result = await RunIsolateCommandAsync($"--box-id={boxId} --init");
|
||||
var result = await RunIsolateCommandAsync($"--box-id={boxId} --cg --init");
|
||||
|
||||
if (result.ExitCode != 0)
|
||||
{
|
||||
@@ -90,7 +90,7 @@ public class IsolateService
|
||||
{
|
||||
_logger.LogDebug("Cleaning up isolate box {BoxId}", boxId);
|
||||
|
||||
var result = await RunIsolateCommandAsync($"--box-id={boxId} --cleanup");
|
||||
var result = await RunIsolateCommandAsync($"--box-id={boxId} --cg --cleanup");
|
||||
|
||||
if (result.ExitCode != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user