Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepository.php
Show First 20 Lines • Show All 1,892 Lines • ▼ Show 20 Lines | /* -( Repository URI Management )------------------------------------------ */ | ||||
* Time limit for cloning or copying this repository. | * Time limit for cloning or copying this repository. | ||||
* | * | ||||
* This limit is used to timeout operations like `git clone` or `git fetch` | * This limit is used to timeout operations like `git clone` or `git fetch` | ||||
* when doing intracluster synchronization, building working copies, etc. | * when doing intracluster synchronization, building working copies, etc. | ||||
* | * | ||||
* @return int Maximum number of seconds to spend copying this repository. | * @return int Maximum number of seconds to spend copying this repository. | ||||
*/ | */ | ||||
public function getCopyTimeLimit() { | public function getCopyTimeLimit() { | ||||
return $this->getDetail('limit.copy'); | |||||
amckinley: If it's too late to change this, no big deal, but `limit.copyTime` or similar might be more… | |||||
} | |||||
public function setCopyTimeLimit($limit) { | |||||
return $this->setDetail('limit.copy', $limit); | |||||
} | |||||
public function getDefaultCopyTimeLimit() { | |||||
return phutil_units('15 minutes in seconds'); | return phutil_units('15 minutes in seconds'); | ||||
} | } | ||||
public function getEffectiveCopyTimeLimit() { | |||||
$limit = $this->getCopyTimeLimit(); | |||||
if ($limit) { | |||||
return $limit; | |||||
} | |||||
return $this->getDefaultCopyTimeLimit(); | |||||
} | |||||
public function getFilesizeLimit() { | |||||
return $this->getDetail('limit.filesize'); | |||||
} | |||||
public function setFilesizeLimit($limit) { | |||||
return $this->setDetail('limit.filesize', $limit); | |||||
} | |||||
/** | /** | ||||
* Retrieve the service URI for the device hosting this repository. | * Retrieve the service URI for the device hosting this repository. | ||||
* | * | ||||
* See @{method:newConduitClient} for a general discussion of interacting | * See @{method:newConduitClient} for a general discussion of interacting | ||||
* with repository services. This method provides lower-level resolution of | * with repository services. This method provides lower-level resolution of | ||||
* services, returning raw URIs. | * services, returning raw URIs. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 869 Lines • Show Last 20 Lines |
If it's too late to change this, no big deal, but limit.copyTime or similar might be more clear.