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
F18104556: D17539.id42197.diff
Sun, Aug 10, 1:08 PM
F18057422: D17539.id.diff
Mon, Aug 4, 9:16 AM
F18035280: D17539.diff
Sun, Aug 3, 1:29 AM
F17938143: D17539.diff
Thu, Jul 31, 1:50 AM
F17935894: D17539.id42197.diff
Wed, Jul 30, 11:42 PM
Unknown Object (File)
Jul 3 2025, 10:27 AM
Unknown Object (File)
Jul 2 2025, 1:46 AM
Unknown Object (File)
Jul 2 2025, 12:47 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