Page MenuHomePhabricator

Clean up overseer modules slightly and provide a throttling support method
ClosedPublic

Authored by epriestley on Mar 23 2017, 1:57 AM.
Tags
None
Referenced Files
F15434100: D17539.diff
Tue, Mar 25, 1:57 AM
F15400877: D17539.id.diff
Mon, Mar 17, 2:28 PM
F15382022: D17539.id42197.diff
Fri, Mar 14, 10:22 AM
F15379888: D17539.diff
Thu, Mar 13, 11:58 PM
F15369660: D17539.diff
Wed, Mar 12, 7:39 AM
Unknown Object (File)
Mon, Mar 3, 3:47 AM
Unknown Object (File)
Feb 21 2025, 3:14 PM
Unknown Object (File)
Feb 18 2025, 10:37 AM
Subscribers
None

Details

Summary

Ref T12298. Make it slightly easier to write overseer modules:

  • You don't need to implement shouldReloadDaemons(), since you can now just implement shouldWakePool() and get useful behavior.
  • It looks like most modules want to do checks only every X seconds, where X is at least somewhat module/use-case dependent, so add a helper for that.
Test Plan

Ran bin/phd debug pull --trace, saw config check fire properly every 10 seconds after updating it to use shouldThrottle() in the next change.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable