File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
checkov/common/parallelizer Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,15 @@ def __init__(
2828 self , workers_number : int | None = None ,
2929 parallelization_type : ParallelizationType = ParallelizationType .FORK
3030 ) -> None :
31+ env_workers = os .getenv ("CHECKOV_WORKERS_NUMBER" )
32+ if env_workers :
33+ try :
34+ workers_number = int (env_workers )
35+ except ValueError :
36+ logging .warning (f"Invalid CHECKOV_WORKERS_NUMBER value: { env_workers } , using default" )
37+
3138 self .workers_number = (workers_number if workers_number else os .cpu_count ()) or 1
39+ logging .debug ("Workers count for the parallel runner is: %s" , self .workers_number )
3240 self .os = platform .system ()
3341 self .type : str | ParallelizationType = parallelization_type
3442 custom_type = os .getenv ("CHECKOV_PARALLELIZATION_TYPE" )
You can’t perform that action at this time.
0 commit comments