You are here

public function StatsTracker::destruct in Purge 8.3

Performs destruct operations.

Overrides DestructableInterface::destruct

File

src/Plugin/Purge/Queue/StatsTracker.php, line 163

Class

StatsTracker
Provides the queue statistics tracker.

Namespace

Drupal\purge\Plugin\Purge\Queue

Code

public function destruct() {

  // When the buffer contains changes, write them to the state API in one go.
  if (count($this->stateBuffer)) {
    $this->state
      ->setMultiple($this->stateBuffer);
    $this->stateBuffer = [];
  }
}