You are here

private function BackgroundProcess::ensureCleanup in Background Process 7.2

Make sure we clean up after ourselves.

3 calls to BackgroundProcess::ensureCleanup()
BackgroundProcess::dispatch in ./background_process.inc
Launch the process
BackgroundProcess::execute in ./background_process.inc
Execute the background process callback function.
BackgroundProcess::start in ./background_process.inc

File

./background_process.inc, line 1085
External API short overview

Class

BackgroundProcess
@file

Code

private function ensureCleanup($shutdown = TRUE, $remove = TRUE) {
  $this->shutdown = $shutdown;
  $this->remove = $remove;
  if (!$this->registered) {
    $this
      ->logDebug(__FUNCTION__);
    $this->registered = TRUE;

    // Make sure the process is removed when we're done
    drupal_register_shutdown_function(array(
      $this,
      'shutdown',
    ));
  }
  return $this;
}