Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/daemon/workers/PhabricatorTriggerDaemon.php
| Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | protected function run() { | ||||
| // phases. Without this separation of responsibilities, web processes | // phases. Without this separation of responsibilities, web processes | ||||
| // trying to reschedule events after an update could race with other web | // trying to reschedule events after an update could race with other web | ||||
| // processes or the daemon. | // processes or the daemon. | ||||
| // We want to start the first GC cycle right away, not wait 4 hours. | // We want to start the first GC cycle right away, not wait 4 hours. | ||||
| $this->nextCollection = PhabricatorTime::getNow(); | $this->nextCollection = PhabricatorTime::getNow(); | ||||
| do { | do { | ||||
| PhabricatorCaches::destroyRequestCache(); | |||||
| $lock = PhabricatorGlobalLock::newLock('trigger'); | $lock = PhabricatorGlobalLock::newLock('trigger'); | ||||
| try { | try { | ||||
| $lock->lock(5); | $lock->lock(5); | ||||
| } catch (PhutilLockException $ex) { | } catch (PhutilLockException $ex) { | ||||
| throw new PhutilProxyException( | throw new PhutilProxyException( | ||||
| pht( | pht( | ||||
| 'Another process is holding the trigger lock. Usually, this '. | 'Another process is holding the trigger lock. Usually, this '. | ||||
| ▲ Show 20 Lines • Show All 317 Lines • Show Last 20 Lines | |||||