You are here

private function BackgroundProcess::ensureProcess in Background Process 7.2

Make sure prerequisites are met.

10 calls to BackgroundProcess::ensureProcess()
BackgroundProcess::dispatch in ./background_process.inc
Launch the process
BackgroundProcess::execute in ./background_process.inc
Execute the background process callback function.
BackgroundProcess::remove in ./background_process.inc
Remove the process from the DB (unlock).
BackgroundProcess::setCallback in ./background_process.inc
Set callback and arguments
BackgroundProcess::setOption in ./background_process.inc
Set callback options

... See full list

File

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

Class

BackgroundProcess
@file

Code

private function ensureProcess() {
  if (!$this->pid) {
    throw new BackgroundProcessException(t('Background process not initialized'), BACKGROUND_PROCESS_ERROR_NO_PID);
  }

  // Ensure DB availability
  drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
  return $this;
}