Page MenuHomePhabricator

Reorganize PhutilDaemon into Overseers, Pools and Daemons in libphutil

Authored by epriestley on Feb 21 2017, 4:48 PM.
Referenced Files
F11790742: D17389.diff
Thu, Jun 1, 1:42 AM
Unknown Object (File)
Sat, May 27, 3:00 PM
Unknown Object (File)
Sun, May 14, 4:19 PM
Unknown Object (File)
Tue, May 2, 2:35 PM
Unknown Object (File)
May 1 2023, 7:37 AM
Unknown Object (File)
Apr 21 2023, 11:13 AM
Unknown Object (File)
Apr 5 2023, 11:22 AM
Unknown Object (File)
Apr 3 2023, 4:34 AM



Ref T12298. Ultimate goal is to let daemon pools scale down to 0 daemons when they aren't doing anything. This doesn't do that yet (and attempts to change no behavior).

This reorganizes the daemon code to make this change easier. Currently, some daemons are in pools and some are not. Intead, make everything a pool (the Pull and Trigger daemons just get pools with maximum size 1).

New object hiearchy is:

  • Overseer
    • Pool
      • Daemon

...and those objects each pretty much take care of their own stuff, instead of having daemons reach up into the Overseer to dispatch events back to themselves.

Test Plan
  • Ran phd debug, phd start, phd stop, phd status, etc.
  • Reviewed daemons in web console.
  • Changed config, saw daemons automatically restart.
  • Sent daemons signals.
  • Used --trace, activated memory tracing, activated verbose mode.

Diff Detail

rPHU libphutil
Lint Not Applicable
Tests Not Applicable