From 1d76fd9920b29b25058c5a3ff0ed4f565e8e95e1 Mon Sep 17 00:00:00 2001 From: eleksir Date: Mon, 6 May 2024 23:00:32 +0300 Subject: [PATCH] Remove cmd_delay config option as it seems to be useless --- .reniced.yaml.example | 3 --- main.go | 2 -- types.go | 3 --- 3 files changed, 8 deletions(-) diff --git a/.reniced.yaml.example b/.reniced.yaml.example index 906a03d..275b72c 100644 --- a/.reniced.yaml.example +++ b/.reniced.yaml.example @@ -4,9 +4,6 @@ daemon: true # PID file for daemon. pidfile: /var/run/reniced.pid -# Delay between addition and execution of tasks to task pool, to lower cpu load peaks. -cmd_delay: 20 - # Delay among iterations. loop_delay: 5000 diff --git a/main.go b/main.go index 8c93a94..ad8e314 100644 --- a/main.go +++ b/main.go @@ -157,8 +157,6 @@ func reniced(cnf Config) { if !ok { log.Printf("Unable to add task to pool") } - - time.Sleep(time.Millisecond * time.Duration(cnf.CmdDelay)) } time.Sleep(time.Millisecond * time.Duration(cnf.LoopDelay)) diff --git a/types.go b/types.go index 50ebd95..130825b 100644 --- a/types.go +++ b/types.go @@ -10,9 +10,6 @@ type Config struct { // LoopDelay in milliseconds - whole set of action delay period. LoopDelay int `yaml:"loop_delay,omitempty"` - // CmdDelay in milliseconds - delay between each change application. - CmdDelay int `yaml:"cmd_delay,omitempty"` - // Whether to print debug info on stdout. Debug bool `yaml:"debug,omitempty"`