You are here

public function BackgroundBatchContext::getProcess in Background Process 7.2

1 call to BackgroundBatchContext::getProcess()
BackgroundBatchContext::offsetSet in background_batch/background_batch.module
Override offsetSet(). Update progress if needed.

File

background_batch/background_batch.module, line 331
This module adds background processing to Drupals batch API

Class

BackgroundBatchContext
Class batch context. Automatically updates progress when 'finished' index is changed.

Code

public function getProcess() {
  if (!$this->process) {
    $this->process = BackgroundProcess::loadByHandle('background_batch:' . $this->batch['id']);
    $this->process
      ->setProgressInterval(variable_get('background_batch_delay', BACKGROUND_BATCH_DELAY));
  }
  return $this->process;
}