mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
events handling: early skipping of extremely frequent exec_* events
The exec_create, exec_start, exec_die and other events are generated by health checks
This commit is contained in:
parent
009201ed0c
commit
ba126e6e7c
@ -87,7 +87,11 @@ func (cm *Docker) watchEvents() {
|
||||
}
|
||||
|
||||
actionName := e.Action
|
||||
// Action may have additional param: "exec_create: redis-cli ping" or "health_status: healthy"
|
||||
// fast skip all exec_* events: exec_create, exec_start, exec_die
|
||||
if strings.HasPrefix(actionName, "exec_") {
|
||||
continue
|
||||
}
|
||||
// Action may have additional param i.e. "health_status: healthy"
|
||||
// We need to strip to have only action name
|
||||
sepIdx := strings.Index(actionName, ": ")
|
||||
if sepIdx != -1 {
|
||||
|
Loading…
Reference in New Issue
Block a user