From da8dd1664df2d660754dfd8547fffa2fb598740d Mon Sep 17 00:00:00 2001 From: Hiroaki Mikami Date: Mon, 29 Mar 2021 08:35:34 +0900 Subject: [PATCH] Fix --num-tasks description --- README.md | 2 +- cmd/start_worker.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2583eaa..77bcc8c 100644 --- a/README.md +++ b/README.md @@ -531,7 +531,7 @@ worker: exitOnEmpty: false # If exitOnEmpty is true, worker waits for exit in the grace period exitOnEmptyGracePeriod: 10s - # If the value was positive, worker will exit + # If the value was non-negative, worker will exit # after processing the number of tasks numTasks: 1000 # Base directory to create workspace for task handler processes diff --git a/cmd/start_worker.go b/cmd/start_worker.go index 85d887e..a957451 100644 --- a/cmd/start_worker.go +++ b/cmd/start_worker.go @@ -105,7 +105,7 @@ func init() { flag.Duration("exit-on-empty-grace-period", cmdOpts.Worker.ExitOnEmptyGracePeriod, "if exit-on-empty is true, worker waits for exit in the grace period") viperBindPFlag("Worker.ExitOnEmptyGracePeriod", cmdOpts.Worker.ExitOnEmptyGracePeriod.String(), flag.Lookup("exit-on-empty-grace-period")) - flag.Int("num-tasks", cmdOpts.Worker.NumTasks, "if set positive value, worker exits after processing the number of tasks") + flag.Int("num-tasks", cmdOpts.Worker.NumTasks, "if set non-negative value, worker exits after processing the number of tasks") viperBindPFlag("Worker.NumTasks", strconv.Itoa(cmdOpts.Worker.NumTasks), flag.Lookup("num-tasks")) flag.String("work-dir", cmdOpts.Worker.WorkDir, "worker's working directory. the dir must be writable")