Replace iomultiprocess with simpler asyncio
@@ -8,7 +8,6 @@ from pathlib import Path
from typing import Dict, Any
import requests
-from aiomultiprocess import Pool
from checkov.common.bridgecrew.platform_integration import bc_integration
from checkov.common.util.file_utils import compress_file_gzip_base64, decompress_file_gzip_base64
@@ -42,8 +41,7 @@ class Scanner:
scan_results.append(self.run_scan(input_path))
else:
input_paths = [(input_path,) for input_path in input_paths]
- with Pool() as pool:
- scan_results = pool.starmap(self.run_scan, input_paths)
+ scan_results = await asyncio.gather(*[self.run_scan(i) for i in input_paths])
return scan_results
