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"`
|
Web Web `yaml:"web"`
|
||||||
|
|
||||||
Labels map[string]string `yaml:"labels"`
|
Labels map[string]string `yaml:"labels"`
|
||||||
|
// ActiveTasksLimit is the max number of concurrent active tasks
|
||||||
|
ActiveTasksLimit int `yaml:"active_tasks_limit"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ConfigStore struct {
|
type ConfigStore struct {
|
||||||
|
|
|
@ -666,6 +666,7 @@ func (e *Executor) sendExecutorStatus(ctx context.Context) error {
|
||||||
ID: e.id,
|
ID: e.id,
|
||||||
ListenURL: e.listenURL,
|
ListenURL: e.listenURL,
|
||||||
Labels: labels,
|
Labels: labels,
|
||||||
|
ActiveTasksLimit: e.c.ActiveTasksLimit,
|
||||||
ActiveTasks: activeTasks,
|
ActiveTasks: activeTasks,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -658,6 +658,7 @@ type Executor struct {
|
||||||
|
|
||||||
Labels map[string]string `json:"labels,omitempty"`
|
Labels map[string]string `json:"labels,omitempty"`
|
||||||
|
|
||||||
|
ActiveTasksLimit int `json:"active_tasks_limit,omitempty"`
|
||||||
ActiveTasks int `json:"active_tasks,omitempty"`
|
ActiveTasks int `json:"active_tasks,omitempty"`
|
||||||
|
|
||||||
// internal values not saved
|
// internal values not saved
|
||||||
|
|
Loading…
Reference in New Issue