Differential D18962 Diff 45486 src/infrastructure/daemon/workers/bulk/PhabricatorWorkerBulkJobWorker.php
Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/bulk/PhabricatorWorkerBulkJobWorker.php
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | $can_edit = PhabricatorPolicyFilter::hasCapability( | ||||
| $job, | $job, | ||||
| PhabricatorPolicyCapability::CAN_EDIT); | PhabricatorPolicyCapability::CAN_EDIT); | ||||
| if (!$can_edit) { | if (!$can_edit) { | ||||
| throw new PhabricatorWorkerPermanentFailureException( | throw new PhabricatorWorkerPermanentFailureException( | ||||
| pht('Job actor does not have permission to edit job.')); | pht('Job actor does not have permission to edit job.')); | ||||
| } | } | ||||
| // Allow the worker to fill user caches inline; bulk jobs occasionally | |||||
| // need to access user preferences. | |||||
| $actor->setAllowInlineCacheGeneration(true); | |||||
| return $actor; | return $actor; | ||||
| } | } | ||||
| final protected function updateJob(PhabricatorWorkerBulkJob $job) { | final protected function updateJob(PhabricatorWorkerBulkJob $job) { | ||||
| $has_work = $this->hasRemainingWork($job); | $has_work = $this->hasRemainingWork($job); | ||||
| if ($has_work) { | if ($has_work) { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines | |||||