Add env checker and set the max worker num as cpus