Add a daemon overseer module to restart daemons when config changes
Summary: Fixes T7053. Depends on D14452.
Test Plan:
Created a custom daemon which dumps out the config hash (by querying PhabricatorEnv::calculateEnvironmentHash()). Ran this daemon with ./bin/phd debug PhabricatorDebugDaemon and saw the config hash update within 30 seconds.
1 | <?php |
---|---|
2 | |
3 | final class PhabricatorDebugDaemon extends PhabricatorDaemon { |
4 | |
5 | protected function run() { |
6 | do { |
7 | PhabricatorCaches::destroyRequestCache(); |
8 | echo PhabricatorEnv::calculateEnvironmentHash(); |
9 | |
10 | $this->sleep(1); |
11 | } while (!$this->shouldExit()); |
12 | } |
13 | |
14 | } |
Reviewers: Blessed Reviewers, epriestley
Reviewed By: Blessed Reviewers, epriestley
Subscribers: Korvin
Maniphest Tasks: T7053
Differential Revision: https://secure.phabricator.com/D14458