fix: update DockerVMManager method signatures for interface compatibility (#287)

- Fix delete_vm() method to accept region and **kwargs parameters
- Fix occupy_vm() method to accept pid, region and **kwargs parameters
- Ensures consistency with base VMManager interface and other providers
- Resolves runtime argument mismatch errors when calling these methods

This maintains backward compatibility while fixing the interface contract.
This commit is contained in:
张逸群
2025-07-26 01:18:00 +08:00
committed by GitHub
parent 40fdc6266f
commit 2ed0436c21

View File

@@ -99,7 +99,8 @@ class DockerVMManager(VMManager):
def check_and_clean(self):
pass
def delete_vm(self, vm_path):
def delete_vm(self, vm_path, region=None, **kwargs):
# Fixed: Added region and **kwargs parameters for interface compatibility
pass
def initialize_registry(self):
@@ -108,7 +109,8 @@ class DockerVMManager(VMManager):
def list_free_vms(self):
return os.path.join(VMS_DIR, DOWNLOADED_FILE_NAME)
def occupy_vm(self, vm_path):
def occupy_vm(self, vm_path, pid, region=None, **kwargs):
# Fixed: Added pid, region and **kwargs parameters for interface compatibility
pass
def get_vm_path(self, os_type, region, screen_size=(1920, 1080), **kwargs):