Changeset View
Changeset View
Standalone View
Standalone View
src/applications/herald/worker/HeraldWebhookWorker.php
| Show All 26 Lines | if ($status !== HeraldWebhookRequest::STATUS_QUEUED) { | ||||
| pht( | pht( | ||||
| 'Webhook request ("%s") is not in "%s" status (actual '. | 'Webhook request ("%s") is not in "%s" status (actual '. | ||||
| 'status is "%s"). Declining call to hook.', | 'status is "%s"). Declining call to hook.', | ||||
| $request_phid, | $request_phid, | ||||
| HeraldWebhookRequest::STATUS_QUEUED, | HeraldWebhookRequest::STATUS_QUEUED, | ||||
| $status)); | $status)); | ||||
| } | } | ||||
| // If we're in silent mode, permanently fail the webhook request and then | |||||
| // return to complete this task. | |||||
| if (PhabricatorEnv::getEnvConfig('phabricator.silent')) { | |||||
| $this->failRequest($request, 'hook', 'silent'); | |||||
| return; | |||||
| } | |||||
| $hook = $request->getWebhook(); | $hook = $request->getWebhook(); | ||||
| if ($hook->isDisabled()) { | if ($hook->isDisabled()) { | ||||
| $this->failRequest($request, 'hook', 'disabled'); | $this->failRequest($request, 'hook', 'disabled'); | ||||
| throw new PhabricatorWorkerPermanentFailureException( | throw new PhabricatorWorkerPermanentFailureException( | ||||
| pht( | pht( | ||||
| 'Associated hook ("%s") for webhook request ("%s") is disabled.', | 'Associated hook ("%s") for webhook request ("%s") is disabled.', | ||||
| $hook->getPHID(), | $hook->getPHID(), | ||||
| ▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines | |||||