mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Allow PhabricatorGlobalLock to block
Summary: See D2924. Test Plan: Ran locks with blocking timeouts. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D2925
This commit is contained in:
parent
67691c196e
commit
ce360926b7
1 changed files with 3 additions and 3 deletions
|
@ -63,7 +63,7 @@ final class PhabricatorGlobalLock extends PhutilLock {
|
||||||
|
|
||||||
/* -( Implementation )----------------------------------------------------- */
|
/* -( Implementation )----------------------------------------------------- */
|
||||||
|
|
||||||
protected function doLock() {
|
protected function doLock($wait) {
|
||||||
$conn = $this->conn;
|
$conn = $this->conn;
|
||||||
if (!$conn) {
|
if (!$conn) {
|
||||||
// NOTE: Using the 'repository' database somewhat arbitrarily, mostly
|
// NOTE: Using the 'repository' database somewhat arbitrarily, mostly
|
||||||
|
@ -87,9 +87,9 @@ final class PhabricatorGlobalLock extends PhutilLock {
|
||||||
|
|
||||||
$result = queryfx_one(
|
$result = queryfx_one(
|
||||||
$conn,
|
$conn,
|
||||||
'SELECT GET_LOCK(%s, %d)',
|
'SELECT GET_LOCK(%s, %f)',
|
||||||
'phabricator:'.$this->lockname,
|
'phabricator:'.$this->lockname,
|
||||||
0);
|
$wait);
|
||||||
|
|
||||||
$ok = head($result);
|
$ok = head($result);
|
||||||
if (!$ok) {
|
if (!$ok) {
|
||||||
|
|
Loading…
Reference in a new issue