Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/storage/PhabricatorWorkerTask.php
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | final public function isArchived() { | ||||
return ($this instanceof PhabricatorWorkerArchiveTask); | return ($this instanceof PhabricatorWorkerArchiveTask); | ||||
} | } | ||||
final public function getWorkerInstance() { | final public function getWorkerInstance() { | ||||
$id = $this->getID(); | $id = $this->getID(); | ||||
$class = $this->getTaskClass(); | $class = $this->getTaskClass(); | ||||
try { | try { | ||||
// NOTE: If the class does not exist, libphutil will throw an exception. | // NOTE: If the class does not exist, the autoloader will throw an | ||||
// exception. | |||||
class_exists($class); | class_exists($class); | ||||
} catch (PhutilMissingSymbolException $ex) { | } catch (PhutilMissingSymbolException $ex) { | ||||
throw new PhabricatorWorkerPermanentFailureException( | throw new PhabricatorWorkerPermanentFailureException( | ||||
pht( | pht( | ||||
"Task class '%s' does not exist!", | "Task class '%s' does not exist!", | ||||
$class)); | $class)); | ||||
} | } | ||||
Show All 12 Lines |