You are here

public function UltimateCronProgress::getProgress in Ultimate Cron 7.2

Get job progress.

Return value

float The progress of this job.

File

./ultimate_cron.progress.inc, line 54
Pseudo namespace for progress functions.

Class

UltimateCronProgress
Class for handling Ultimate Cron progress.

Code

public function getProgress() {
  $name = 'uc-progress:' . $this->name;
  $target = _ultimate_cron_get_transactional_safe_connection();
  $value = db_select('variable', 'v', array(
    'target' => $target,
  ))
    ->fields('v', array(
    'value',
  ))
    ->condition('v.name', $name)
    ->execute()
    ->fetchField();
  $value = $value ? unserialize($value) : FALSE;
  return $value;
}