runservice executor: report ActiveTasksLimit
Add a config option to set the active tasks limit and report it.
This commit is contained in:
parent
455623e58a
commit
4dd89646af
|
@ -82,6 +82,8 @@ type RunServiceExecutor struct {
|
|||
Web Web `yaml:"web"`
|
||||
|
||||
Labels map[string]string `yaml:"labels"`
|
||||
// ActiveTasksLimit is the max number of concurrent active tasks
|
||||
ActiveTasksLimit int `yaml:"active_tasks_limit"`
|
||||
}
|
||||
|
||||
type ConfigStore struct {
|
||||
|
|
|
@ -666,6 +666,7 @@ func (e *Executor) sendExecutorStatus(ctx context.Context) error {
|
|||
ID: e.id,
|
||||
ListenURL: e.listenURL,
|
||||
Labels: labels,
|
||||
ActiveTasksLimit: e.c.ActiveTasksLimit,
|
||||
ActiveTasks: activeTasks,
|
||||
}
|
||||
|
||||
|
|
|
@ -658,6 +658,7 @@ type Executor struct {
|
|||
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
|
||||
ActiveTasksLimit int `json:"active_tasks_limit,omitempty"`
|
||||
ActiveTasks int `json:"active_tasks,omitempty"`
|
||||
|
||||
// internal values not saved
|
||||
|
|
Loading…
Reference in New Issue