diff --git a/examples/00_run_all_async.py b/examples/00_run_all_async.py index 7e664cbb..a5c26f75 100644 --- a/examples/00_run_all_async.py +++ b/examples/00_run_all_async.py @@ -198,7 +198,7 @@ async def main(): for example_file in example_files: example_name = example_file.name timeout = flow_timeouts.get(example_name, args.timeout) - result = await run_example(example_file, timeout, suffix) + result = await run_example(example_file, timeout) results.append(result) # Break on error diff --git a/examples/03_basic_commands_async.py b/examples/03_basic_commands_async.py index adb45214..f2360d3e 100644 --- a/examples/03_basic_commands_async.py +++ b/examples/03_basic_commands_async.py @@ -3,6 +3,7 @@ import asyncio import os +import sys import random diff --git a/koyeb/sandbox/filesystem.py b/koyeb/sandbox/filesystem.py index 25998044..b4cf0fa6 100644 --- a/koyeb/sandbox/filesystem.py +++ b/koyeb/sandbox/filesystem.py @@ -308,7 +308,7 @@ def write_files(self, files: List[Dict[str, str]]) -> None: path = file_info["path"] content = file_info["content"] encoding = file_info.get("encoding", "utf-8") - self.write_file(path, content, encoding) + SandboxFilesystem.write_file(self, path, content, encoding) def exists(self, path: str) -> bool: """Check if file/directory exists synchronously""" @@ -352,7 +352,7 @@ def upload_file( with open(local_path, "rb") as f: content_bytes = f.read() - self.write_file(remote_path, content_bytes, encoding=encoding) + SandboxFilesystem.write_file(self, remote_path, content_bytes, encoding=encoding) def download_file( self, remote_path: str, local_path: str, encoding: str = "utf-8" @@ -368,7 +368,7 @@ def download_file( Raises: SandboxFileNotFoundError: If remote file doesn't exist """ - file_info = self.read_file(remote_path, encoding=encoding) + file_info = SandboxFilesystem.read_file(self, remote_path, encoding=encoding) if isinstance(file_info.content, bytes): content_bytes = file_info.content @@ -388,7 +388,7 @@ def ls(self, path: str = ".") -> List[str]: Returns: List of file/directory names """ - return self.list_dir(path) + return SandboxFilesystem.list_dir(self, path) def rm(self, path: str, recursive: bool = False) -> None: """