You are here

public function BackgroundProcess::writeData in Background Process 7.2

Write applicable data (if any) to the database

3 calls to BackgroundProcess::writeData()
BackgroundProcess::dispatch in ./background_process.inc
Launch the process
BackgroundProcess::ensureServiceHost in ./background_process.inc
Make sure that the process has been designated a service host.
BackgroundProcess::shutdown in ./background_process.inc
Shutdown

File

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

Class

BackgroundProcess
@file

Code

public function writeData() {
  if (empty($this->dirty)) {
    return;
  }
  $this
    ->logDebug(__FUNCTION__);
  try {
    db_update('background_process', array(
      'target' => 'background_process',
    ))
      ->fields($this->dirty)
      ->condition('pid', $this->pid)
      ->execute();
    $this
      ->sendMessage('writeData');
  } catch (Exception $e) {
    throw $e;
  }
  $this
    ->logDebug(__FUNCTION__ . ' - done');
  $this->dirty = array();
}