Compare commits
2 Commits
v1.2
...
5976d0b327
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5976d0b327 | ||
|
|
62bbf9d277 |
@@ -5,12 +5,12 @@ package lib
|
|||||||
|
|
||||||
import proc "github.com/shirou/gopsutil/v3/process"
|
import proc "github.com/shirou/gopsutil/v3/process"
|
||||||
|
|
||||||
func GetIOPriority(which int, who int) (prio uint32, err error) {
|
func (cnf Config) GetIOPriority(which int, who int) (prio uint32, err error) {
|
||||||
return 0, NotImplementedError
|
return 0, cnf.NotImplementedError
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetIOPriority(which int, who int, prio uint32) (err error) {
|
func (cnf Config) SetIOPriority(which int, who int, prio uint32) (err error) {
|
||||||
return NotImplementedError
|
return cnf.NotImplementedError
|
||||||
}
|
}
|
||||||
|
|
||||||
func IORenice(cnf Config, p *proc.Process, processName string) {}
|
func (cnf Config) IORenice(cnf Config, p *proc.Process, processName string) {}
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ func (cnf *Config) readConfFile(path string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if cnf.MaxWorkers == 0 {
|
if cnf.MaxWorkers == 0 {
|
||||||
cnf.MaxWorkers = 5
|
cnf.MaxWorkers = runtime.NumCPU()
|
||||||
log.Printf("max_workers set to %d", cnf.MaxWorkers)
|
log.Printf("max_workers set to %d", cnf.MaxWorkers)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user