Differential D10585 Diff 25583 src/applications/config/option/PhabricatorGarbageCollectorConfigOptions.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/option/PhabricatorGarbageCollectorConfigOptions.php
| Show All 10 Lines | public function getDescription() { | ||||
| return pht('Configure the GC for old logs, caches, etc.'); | return pht('Configure the GC for old logs, caches, etc.'); | ||||
| } | } | ||||
| public function getOptions() { | public function getOptions() { | ||||
| $options = array( | $options = array( | ||||
| 'gcdaemon.ttl.herald-transcripts' => array( | 'gcdaemon.ttl.herald-transcripts' => array( | ||||
| 30, | 30, | ||||
| pht('Number of seconds to retain Herald transcripts for.')), | pht('Number of seconds to retain Herald transcripts for.'), | ||||
| ), | |||||
| 'gcdaemon.ttl.daemon-logs' => array( | 'gcdaemon.ttl.daemon-logs' => array( | ||||
| 7, | 7, | ||||
| pht('Number of seconds to retain Daemon logs for.')), | pht('Number of seconds to retain Daemon logs for.'), | ||||
| ), | |||||
| 'gcdaemon.ttl.differential-parse-cache' => array( | 'gcdaemon.ttl.differential-parse-cache' => array( | ||||
| 14, | 14, | ||||
| pht('Number of seconds to retain Differential parse caches for.')), | pht('Number of seconds to retain Differential parse caches for.'), | ||||
| ), | |||||
| 'gcdaemon.ttl.markup-cache' => array( | 'gcdaemon.ttl.markup-cache' => array( | ||||
| 30, | 30, | ||||
| pht('Number of seconds to retain Markup cache entries for.')), | pht('Number of seconds to retain Markup cache entries for.'), | ||||
| ), | |||||
| 'gcdaemon.ttl.task-archive' => array( | 'gcdaemon.ttl.task-archive' => array( | ||||
| 14, | 14, | ||||
| pht('Number of seconds to retain archived background tasks for.')), | pht('Number of seconds to retain archived background tasks for.'), | ||||
| ), | |||||
| 'gcdaemon.ttl.general-cache' => array( | 'gcdaemon.ttl.general-cache' => array( | ||||
| 30, | 30, | ||||
| pht('Number of seconds to retain general cache entries for.')), | pht('Number of seconds to retain general cache entries for.'), | ||||
| ), | |||||
| 'gcdaemon.ttl.conduit-logs' => array( | 'gcdaemon.ttl.conduit-logs' => array( | ||||
| 180, | 180, | ||||
| pht('Number of seconds to retain Conduit call logs for.')) | pht('Number of seconds to retain Conduit call logs for.'), | ||||
| ), | |||||
| ); | ); | ||||
| $result = array(); | $result = array(); | ||||
| foreach ($options as $key => $spec) { | foreach ($options as $key => $spec) { | ||||
| list($default_days, $description) = $spec; | list($default_days, $description) = $spec; | ||||
| $result[] = $this | $result[] = $this | ||||
| ->newOption($key, 'int', $default_days * (24 * 60 * 60)) | ->newOption($key, 'int', $default_days * (24 * 60 * 60)) | ||||
| ->setDescription($description) | ->setDescription($description) | ||||
| Show All 10 Lines | |||||