Threads config support

This commit is contained in:
2021-12-22 20:15:49 +01:00
parent 8aaf241075
commit 625c246ba9
2 changed files with 9 additions and 2 deletions

View File

@@ -116,8 +116,15 @@ func init() {
}
func main() {
str_debug := os.Getenv("debug")
str_threads := os.Getenv("threads")
threads, _ := strconv.Atoi(str_threads)
debug, _ := strconv.ParseBool(str_debug)
//startTime := time.Now()
results := boundedParallelGet(checks, 100)
results := boundedParallelGet(checks, threads)
//seconds := time.Since(startTime).Seconds()
//tmplate := "requests: %d/%d in %v"

View File

@@ -120,7 +120,7 @@ class PluginRemotesupportRemotesupport extends CommonDBTM
);
$cwd = '/tmp';
$env = array('debug' => 'false');
$env = array('debug' => 'false', 'threads' => $config["threads"]);
$process = proc_open($rs_path . '/bin/check_status', $descriptorspec, $pipes, $cwd, $env);