Skip to content

Commit 4599476

Browse files
committed
Delete Job.keep_sandbox
1 parent c811161 commit 4599476

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

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,
@@ -108,9 +107,6 @@ def __init__(
108107
allow multithreading.
109108
archive_sandbox: whether the sandbox is to be archived.
110109
shard: the shard of the Worker completing this job.
111-
keep_sandbox: whether to forcefully keep the sandbox,
112-
even if other conditions (the config, the sandbox status)
113-
don't warrant it.
114110
sandboxes: the paths of the sandboxes used in
115111
the Worker during the execution of the job.
116112
sandbox_digests: the digests of the sandbox archives used to
@@ -148,7 +144,6 @@ def __init__(
148144
self.multithreaded_sandbox = multithreaded_sandbox
149145
self.archive_sandbox = archive_sandbox
150146
self.shard = shard
151-
self.keep_sandbox = keep_sandbox
152147
self.sandboxes = sandboxes
153148
self.sandbox_digests = sandbox_digests
154149
self.info = info
@@ -172,7 +167,6 @@ def export_to_dict(self) -> dict:
172167
'multithreaded_sandbox': self.multithreaded_sandbox,
173168
'archive_sandbox': self.archive_sandbox,
174169
'shard': self.shard,
175-
'keep_sandbox': self.keep_sandbox,
176170
'sandboxes': self.sandboxes,
177171
'sandbox_digests': self.sandbox_digests,
178172
'info': self.info,
@@ -303,7 +297,6 @@ def __init__(
303297
task_type: str | None = None,
304298
task_type_parameters: object = None,
305299
shard: int | None = None,
306-
keep_sandbox: bool = False,
307300
sandboxes: list[str] | None = None,
308301
sandbox_digests: dict[str, str] | None = None,
309302
info: str | None = None,
@@ -330,7 +323,7 @@ def __init__(
330323

331324
Job.__init__(self, operation, task_type, task_type_parameters,
332325
language, multithreaded_sandbox, archive_sandbox,
333-
shard, keep_sandbox, sandboxes, sandbox_digests, info, success,
326+
shard, sandboxes, sandbox_digests, info, success,
334327
text, files, managers, executables)
335328
self.compilation_success = compilation_success
336329
self.plus = plus
@@ -520,7 +513,6 @@ def __init__(
520513
task_type: str | None = None,
521514
task_type_parameters: object = None,
522515
shard: int | None = None,
523-
keep_sandbox: bool = False,
524516
sandboxes: list[str] | None = None,
525517
sandbox_digests: dict[str, str] | None = None,
526518
info: str | None = None,
@@ -566,7 +558,7 @@ def __init__(
566558
"""
567559
Job.__init__(self, operation, task_type, task_type_parameters,
568560
language, multithreaded_sandbox, archive_sandbox,
569-
shard, keep_sandbox, sandboxes, sandbox_digests, info, success,
561+
shard, sandboxes, sandbox_digests, info, success,
570562
text, files, managers, executables)
571563
self.input = input
572564
self.output = output

cms/grading/tasktypes/Communication.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,6 @@ def evaluate(self, job, file_cacher):
436436
delete_sandbox(sandbox_mgr, job)
437437
for s in sandbox_user:
438438
delete_sandbox(s, job)
439-
if job.success and not job.keep_sandbox:
439+
if job.success:
440440
for d in fifo_dir:
441441
rmtree(d)

0 commit comments

Comments
 (0)