You are here

public static function ProgressMemcache::factory in Ultimate Cron 8.2

Singleton factory.

Parameters

string $name: Name of job.

float $interval: How often the database should be updated with the progress.

Return value

Progress The object.

File

src/Progress/ProgressMemcache.php, line 37

Class

ProgressMemcache

Namespace

Drupal\ultimate_cron\Progress

Code

public static function factory($name, $interval = 1) {
  if (!isset(self::$instances[$name])) {
    self::$instances[$name] = new ProgressMemcache($name, $interval);
  }
  self::$instances[$name]->interval = $interval;
  return self::$instances[$name];
}