Page MenuHomePhabricator

Allow daemon modules to awake hibernating daemons from slumber
ClosedPublic

Authored by epriestley on Mar 23 2017, 1:17 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 2:36 PM
Unknown Object (File)
Sun, Nov 10, 11:09 AM
Unknown Object (File)
Wed, Nov 6, 1:02 AM
Unknown Object (File)
Oct 25 2024, 1:32 PM
Unknown Object (File)
Oct 21 2024, 9:23 AM
Unknown Object (File)
Oct 9 2024, 7:42 AM
Unknown Object (File)
Sep 6 2024, 7:58 PM
Unknown Object (File)
Sep 5 2024, 11:26 PM
Subscribers
None

Details

Summary

Ref T12298. For repository and taskmaster daemons, before we let them hibernate, we want to be able to wake them up if a new task comes in or a repository gets an update request.

If we can't do this, the first action (commit, comment, etc) after a lull of activity may take several minutes to actually get processed by the daemons since we have to wait around for them to wake up on their own.

With this mechanism, daemon overseers can periodically run some queries (e.g., are there new tasks?) to see if pools should wake from hibernation.

Test Plan

Wrote a fake module to awaken trigger daemons by rolling dice, ran bin/phd debug trigger, saw it reawaken them successfully after random intervals.

Diff Detail

Repository
rPHU libphutil
Branch
wake1
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/daemon/PhutilDaemonPool.php:225XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 16099
Build 21361: Run Core Tests
Build 21360: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 23 2017, 3:48 PM
This revision was automatically updated to reflect the committed changes.