mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
Skip Conduit call log writes in read-only mode, allowing "conduit.ping" to run
Summary: Ref T10769. See PHI8. We have an unconditional logging write which we can skip in read-only mode. Test Plan: - Put Phabricator in read-only mode with `cluster.read-only`. - Called `conduit.ping` via web UI. - Before: write-on-read-only exception. - After: good result. Reviewers: chad, amckinley Reviewed By: chad Maniphest Tasks: T10769 Differential Revision: https://secure.phabricator.com/D18233
This commit is contained in:
parent
d1f144b214
commit
4d1ed12a9e
1 changed files with 5 additions and 3 deletions
|
@ -119,9 +119,11 @@ final class PhabricatorConduitAPIController
|
|||
->setError((string)$error_code)
|
||||
->setDuration(1000000 * ($time_end - $time_start));
|
||||
|
||||
if (!PhabricatorEnv::isReadOnly()) {
|
||||
$unguarded = AphrontWriteGuard::beginScopedUnguardedWrites();
|
||||
$log->save();
|
||||
unset($unguarded);
|
||||
}
|
||||
|
||||
$response = id(new ConduitAPIResponse())
|
||||
->setResult($result)
|
||||
|
|
Loading…
Reference in a new issue