@@ -78,7 +78,7 @@ class Job(object):
7878 def __init__ (self , operation = None ,
7979 task_type = None , task_type_parameters = None ,
8080 language = None , multithreaded_sandbox = False ,
81- shard = None , sandboxes = None , info = None ,
81+ shard = None , keep_sandbox = False , sandboxes = None , info = None ,
8282 success = None , text = None ,
8383 files = None , managers = None , executables = None ):
8484 """Initialization.
@@ -92,6 +92,9 @@ def __init__(self, operation=None,
9292 multithreaded_sandbox (boolean): whether the sandbox should
9393 allow multithreading.
9494 shard (int|None): the shard of the Worker completing this job.
95+ keep_sandbox (bool): whether to forcefully keep the sandbox,
96+ even if other conditions (the config, the sandbox status)
97+ don't warrant it.
9598 sandboxes ([string]|None): the paths of the sandboxes used in
9699 the Worker during the execution of the job.
97100 info (string|None): a human readable description of the job.
@@ -126,6 +129,7 @@ def __init__(self, operation=None,
126129 self .language = language
127130 self .multithreaded_sandbox = multithreaded_sandbox
128131 self .shard = shard
132+ self .keep_sandbox = keep_sandbox
129133 self .sandboxes = sandboxes
130134 self .info = info
131135
@@ -147,6 +151,7 @@ def export_to_dict(self):
147151 'language' : self .language ,
148152 'multithreaded_sandbox' : self .multithreaded_sandbox ,
149153 'shard' : self .shard ,
154+ 'keep_sandbox' : self .keep_sandbox ,
150155 'sandboxes' : self .sandboxes ,
151156 'info' : self .info ,
152157 'success' : self .success ,
@@ -250,7 +255,7 @@ class CompilationJob(Job):
250255
251256 def __init__ (self , operation = None , task_type = None ,
252257 task_type_parameters = None ,
253- shard = None , sandboxes = None , info = None ,
258+ shard = None , keep_sandbox = False , sandboxes = None , info = None ,
254259 language = None , multithreaded_sandbox = False ,
255260 files = None , managers = None ,
256261 success = None , compilation_success = None ,
@@ -267,7 +272,7 @@ def __init__(self, operation=None, task_type=None,
267272
268273 Job .__init__ (self , operation , task_type , task_type_parameters ,
269274 language , multithreaded_sandbox ,
270- shard , sandboxes , info , success , text ,
275+ shard , keep_sandbox , sandboxes , info , success , text ,
271276 files , managers , executables )
272277 self .compilation_success = compilation_success
273278 self .plus = plus
@@ -436,7 +441,7 @@ class EvaluationJob(Job):
436441 """
437442 def __init__ (self , operation = None , task_type = None ,
438443 task_type_parameters = None , shard = None ,
439- sandboxes = None , info = None ,
444+ keep_sandbox = False , sandboxes = None , info = None ,
440445 language = None , multithreaded_sandbox = False ,
441446 files = None , managers = None , executables = None ,
442447 input = None , output = None ,
@@ -468,7 +473,7 @@ def __init__(self, operation=None, task_type=None,
468473 """
469474 Job .__init__ (self , operation , task_type , task_type_parameters ,
470475 language , multithreaded_sandbox ,
471- shard , sandboxes , info , success , text ,
476+ shard , keep_sandbox , sandboxes , info , success , text ,
472477 files , managers , executables )
473478 self .input = input
474479 self .output = output
0 commit comments