Skip to content

Commit a40b3b4

Browse files
committed
Delete Job.keep_sandbox
1 parent 581321f commit a40b3b4

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

cms/grading/Job.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ def __init__(
8787
multithreaded_sandbox: bool = False,
8888
archive_sandbox: bool = False,
8989
shard: int | None = None,
90-
keep_sandbox: bool = False,
9190
sandboxes: list[str] | None = None,
9291
sandbox_digests: dict[str, str] | None = None,
9392
info: str | None = None,
@@ -109,9 +108,6 @@ def __init__(
109108
allow multithreading.
110109
archive_sandbox: whether the sandbox is to be archived.
111110
shard: the shard of the Worker completing this job.
112-
keep_sandbox: whether to forcefully keep the sandbox,
113-
even if other conditions (the config, the sandbox status)
114-
don't warrant it.
115111
sandboxes: the paths of the sandboxes used in
116112
the Worker during the execution of the job.
117113
sandbox_digests: the digests of the sandbox archives used to
@@ -151,7 +147,6 @@ def __init__(
151147
self.multithreaded_sandbox = multithreaded_sandbox
152148
self.archive_sandbox = archive_sandbox
153149
self.shard = shard
154-
self.keep_sandbox = keep_sandbox
155150
self.sandboxes = sandboxes
156151
self.sandbox_digests = sandbox_digests
157152
self.info = info
@@ -176,7 +171,6 @@ def export_to_dict(self) -> dict:
176171
'multithreaded_sandbox': self.multithreaded_sandbox,
177172
'archive_sandbox': self.archive_sandbox,
178173
'shard': self.shard,
179-
'keep_sandbox': self.keep_sandbox,
180174
'sandboxes': self.sandboxes,
181175
'sandbox_digests': self.sandbox_digests,
182176
'info': self.info,
@@ -308,7 +302,6 @@ def __init__(
308302
task_type: str | None = None,
309303
task_type_parameters: object = None,
310304
shard: int | None = None,
311-
keep_sandbox: bool = False,
312305
sandboxes: list[str] | None = None,
313306
sandbox_digests: dict[str, str] | None = None,
314307
info: str | None = None,
@@ -336,7 +329,7 @@ def __init__(
336329

337330
Job.__init__(self, operation, task_type, task_type_parameters,
338331
language, multithreaded_sandbox, archive_sandbox,
339-
shard, keep_sandbox, sandboxes, sandbox_digests, info, success,
332+
shard, sandboxes, sandbox_digests, info, success,
340333
text, admin_text, files, managers, executables)
341334
self.compilation_success = compilation_success
342335
self.plus = plus
@@ -526,7 +519,6 @@ def __init__(
526519
task_type: str | None = None,
527520
task_type_parameters: object = None,
528521
shard: int | None = None,
529-
keep_sandbox: bool = False,
530522
sandboxes: list[str] | None = None,
531523
sandbox_digests: dict[str, str] | None = None,
532524
info: str | None = None,
@@ -573,7 +565,7 @@ def __init__(
573565
"""
574566
Job.__init__(self, operation, task_type, task_type_parameters,
575567
language, multithreaded_sandbox, archive_sandbox,
576-
shard, keep_sandbox, sandboxes, sandbox_digests, info, success,
568+
shard, sandboxes, sandbox_digests, info, success,
577569
text, admin_text, files, managers, executables)
578570
self.input = input
579571
self.output = output

cms/grading/tasktypes/Communication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,6 @@ def evaluate(self, job: EvaluationJob, file_cacher: FileCacher):
443443
delete_sandbox(sandbox_mgr, job, file_cacher)
444444
for s in sandbox_user:
445445
delete_sandbox(s, job, file_cacher)
446-
if job.success and not job.keep_sandbox:
446+
if job.success:
447447
for d in fifo_dir:
448448
rmtree(d)

0 commit comments

Comments
 (0)