public function setup() { parent::setup(); $datetime = $this->getDatetime(); $registrations = $datetime->Registrations('"Status" = \'Valid\''); $this->emails = $registrations->map('Email', 'Name'); $this->totalSteps = count($this->emails); }
public function setup() { parent::setup(); $obj = $this->getObject(); if ($obj) { $this->cachePublisher->recacheFragments($obj); } }
/** * On any restart, make sure to check that our temporary file is being created still. */ public function prepareForRestart() { parent::prepareForRestart(); // if the file we've been building is missing, lets fix it up if (!$this->tempFile || !file_exists($this->tempFile)) { $tmpfile = tempnam(getTempFolder(), 'sitemap'); if (file_exists($tmpfile)) { $this->tempFile = $tmpfile; } $this->currentStep = 0; $this->pagesToProcess = DB::query('SELECT ID FROM SiteTree_Live WHERE ShowInSearch=1')->column(); } }
/** * On any restart, make sure to check that our temporary file is being created still. */ public function prepareForRestart() { parent::prepareForRestart(); // if the file we've been building is missing, lets fix it up if (!$this->tempFile || !file_exists($this->tempFile)) { $tmpfile = tempnam(getTempFolder(), 'postsitemap'); if (file_exists($tmpfile)) { $this->tempFile = $tmpfile; } $this->currentStep = 0; $this->toProcess = $this->getProcessIds(); } }
/** * * By default {@link AbstractQueuedJob} will only queue 1 "identical" job at * a time, so an implementation of this method is necessary becuase we need * to fire-off multiple jobs for processing a different chunk of objects. * * See the QueuedJobs' wiki for more info: * https://github.com/silverstripe-australia/silverstripe-queuedjobs/wiki/Defining-queued-jobs * * @return string */ public function getSignature() { parent::getSignature(); return $this->randomSignature(); }
/** * On any restart, make sure to check that our temporary file is being created still. */ public function prepareForRestart() { parent::prepareForRestart(); }
public function getSignature() { return parent::getSignature(); }