Skip to content

Commit

Permalink
Ignore irrelevant container events
Browse files Browse the repository at this point in the history
These are internal transient states which don't need to reflect in the
UI. They happen quickly in bursts, with a "permanent state" event
following such as "create", "died", or "remove". This helps to reduce
the API calls and thus mitigates out-of-order results; see
containers/podman#19124
  • Loading branch information
martinpitt committed Jul 13, 2023
1 parent aa136d7 commit 30276aa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,15 @@ class Application extends React.Component {
switch (event.Action) {
/* The following events do not need to trigger any state updates */
case 'attach':
case 'cleanup':
case 'exec':
case 'export':
case 'import':
case 'init':
case 'mount':
case 'restart':
case 'sync':
case 'unmount':
case 'wait':
break;
/* The following events need only to update the Container list
Expand All @@ -343,15 +348,10 @@ class Application extends React.Component {
case 'died':
case 'exec_died':
case 'kill':
case 'cleanup':
case 'mount':
case 'pause':
case 'prune':
case 'restart':
case 'restore':
case 'stop':
case 'sync':
case 'unmount':
case 'unpause':
case 'rename': // rename event is available starting podman v4.1; until then the container does not get refreshed after renaming
this.updateContainer(id, system, event);
Expand Down

0 comments on commit 30276aa

Please sign in to comment.