File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,6 @@ def get_memory_usage() -> float:
4747def cleanup_memory ():
4848 """Force garbage collection to free memory"""
4949 gc .collect ()
50- if hasattr (gc , "collect" ):
51- gc .collect ()
5250
5351
5452def aggressive_cleanup_memory ():
@@ -282,11 +280,11 @@ async def execute_code(self, code: str) -> str:
282280 if process .returncode == 0 :
283281 result = stdout .strip ()
284282 else :
285- result = f"Error: Process exited with code " f" { process .returncode } \n { stderr } "
283+ result = f"Error: Process exited with code { process .returncode } \n { stderr } "
286284
287285 except subprocess .TimeoutExpired :
288286 process .kill ()
289- result = f"Error: Code execution timed out after " f" { self .timeout } seconds"
287+ result = f"Error: Code execution timed out after { self .timeout } seconds"
290288
291289 except Exception as e :
292290 result = f"Error: Failed to execute code: { str (e )} "
You can’t perform that action at this time.
0 commit comments