Homec4science

Separate individual daemon process logic into PhutilDaemonHandle

Authored by epriestley <git@epriestley.com> on Feb 22 2015, 16:13.

Description

Separate individual daemon process logic into PhutilDaemonHandle

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.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7352

Differential Revision: https://secure.phabricator.com/D11851

Details

Committed
epriestley <git@epriestley.com>Feb 24 2015, 23:49
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU55861bcbd6a5: Use stdio, not signals, to heartbeat from the daemons
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHUbd7d8e9fca98: Separate individual daemon process logic into PhutilDaemonHandle (authored by epriestley <git@epriestley.com>).Feb 24 2015, 23:49