Page MenuHomePhabricator

Separate individual daemon process logic into PhutilDaemonHandle
ClosedPublic

Authored by epriestley on Feb 22 2015, 3:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 9, 1:59 PM
Unknown Object (File)
Sat, Jan 4, 10:49 AM
Unknown Object (File)
Tue, Dec 24, 2:00 PM
Unknown Object (File)
Thu, Dec 19, 7:51 AM
Unknown Object (File)
Sun, Dec 15, 8:14 AM
Unknown Object (File)
Sun, Dec 15, 3:14 AM
Unknown Object (File)
Sat, Dec 14, 5:08 PM
Unknown Object (File)
Sat, Dec 14, 4:27 PM
Subscribers

Details

Summary

Ref T7352. Overall, I want to run one overseer per daemon group instead of one overseer per daemon, to reduce the minimum footprint of an inactive Phacility instance.

PhutilDaemonOverseer currently has a mixture of logic specific to the overseer (e.g., argument parsing, signal handling) and logic specific to the daemon process (e.g., heartbeat handling).

Separate this logic, so the Overseer has a list of DaemonHandles. Currently, it always has exactly one DaemonHandle, but the logic anticipates a future diff where it may have more than one.

Test Plan
  • Ran bin/phd debug nice, bin/phd debug taskmaster, observed normal operation.
  • Used ^C and other signals to terminate daemons.
  • Viewed daemon status in daemon console.
  • Used phd start, phd stop to start and stop daemons normally.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Separate individual daemon process logic into PhutilDaemonHandle.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Feb 23 2015, 5:22 PM