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
F14407340: D17539.id.diff
Tue, Dec 24, 2:45 AM
Unknown Object (File)
Sat, Dec 21, 2:39 PM
Unknown Object (File)
Thu, Dec 19, 12:52 AM
Unknown Object (File)
Fri, Dec 13, 6:23 PM
Unknown Object (File)
Sun, Dec 8, 12:30 PM
Unknown Object (File)
Sat, Dec 7, 11:39 AM
Unknown Object (File)
Thu, Dec 5, 9:59 PM
Unknown Object (File)
Wed, Dec 4, 9:52 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