Differential D16041 Diff 38608 src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/worker/PhabricatorApplicationTransactionPublishWorker.php
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | final class PhabricatorApplicationTransactionPublishWorker | ||||
| * Load the transactions to be published. | * Load the transactions to be published. | ||||
| */ | */ | ||||
| private function loadTransactions( | private function loadTransactions( | ||||
| PhabricatorApplicationTransactionInterface $object) { | PhabricatorApplicationTransactionInterface $object) { | ||||
| $data = $this->getTaskData(); | $data = $this->getTaskData(); | ||||
| $xaction_phids = idx($data, 'xactionPHIDs'); | $xaction_phids = idx($data, 'xactionPHIDs'); | ||||
| if (!$xaction_phids) { | if (!$xaction_phids) { | ||||
| throw new PhabricatorWorkerPermanentFailureException( | // It's okay if we don't have any transactions. This can happen when | ||||
| pht('Task has no transaction PHIDs!')); | // creating objects or performing no-op updates. We will still apply | ||||
| // meaningful side effects like updating search engine indexes. | |||||
| return array(); | |||||
| } | } | ||||
| $viewer = PhabricatorUser::getOmnipotentUser(); | $viewer = PhabricatorUser::getOmnipotentUser(); | ||||
| $query = PhabricatorApplicationTransactionQuery::newQueryForObject($object); | $query = PhabricatorApplicationTransactionQuery::newQueryForObject($object); | ||||
| if (!$query) { | if (!$query) { | ||||
| throw new PhabricatorWorkerPermanentFailureException( | throw new PhabricatorWorkerPermanentFailureException( | ||||
| pht( | pht( | ||||
| Show All 23 Lines | |||||