mirror of
https://github.com/datarhei/core.git
synced 2025-10-11 10:50:09 +08:00
Add resource manager
This commit is contained in:
@@ -132,6 +132,11 @@ func (f *ffmpeg) New(config ProcessConfig) (process.Process, error) {
|
||||
}
|
||||
}
|
||||
|
||||
limitMode := process.LimitModeHard
|
||||
if config.LimitMode == "soft" {
|
||||
limitMode = process.LimitModeSoft
|
||||
}
|
||||
|
||||
ffmpeg, err := process.New(process.Config{
|
||||
Binary: f.binary,
|
||||
Args: config.Args,
|
||||
@@ -142,7 +147,7 @@ func (f *ffmpeg) New(config ProcessConfig) (process.Process, error) {
|
||||
LimitCPU: config.LimitCPU,
|
||||
LimitMemory: config.LimitMemory,
|
||||
LimitDuration: config.LimitDuration,
|
||||
LimitMode: process.LimitModeHard,
|
||||
LimitMode: limitMode,
|
||||
Scheduler: scheduler,
|
||||
Parser: config.Parser,
|
||||
Logger: config.Logger,
|
||||
|
Reference in New Issue
Block a user