Threads config support
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user