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
F13217946: D17539.id42197.diff
Sat, May 18, 9:05 AM
F13196041: D17539.diff
Sun, May 12, 10:53 PM
F13178618: D17539.diff
Wed, May 8, 8:32 PM
Unknown Object (File)
Tue, May 7, 3:59 AM
Unknown Object (File)
Sun, May 5, 9:19 AM
Unknown Object (File)
Thu, Apr 25, 2:59 AM
Unknown Object (File)
Apr 6 2024, 1:50 AM
Unknown Object (File)
Apr 5 2024, 12:51 PM
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
Branch
wake2
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 16100
Build 21363: Run Core Tests
Build 21362: arc lint + arc unit