burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

Add support for delayed feature loading #580

Closed metcalf closed 8 years ago

metcalf commented 8 years ago

Zeus currently only reports features once when the action it executes completes. Many of our actions spawn long running server processes in a new thread. These can subsequently require new files (especially if you're using an autoloader).

This PR adds support for calling Zeus.notify_features after an action has run to report additional features to Zeus.

An alternative implementation would leave LoadTracking as-is and ask consumer to call Zeus.notify_features to load delayed features. This avoids a circular dependency between Zeus and Zeus::LoadTracking but I believe would be the first instance of expecting client code to call a method on Zeus.

metcalf commented 8 years ago

@ptarjan: have a sec to look at this and talk through the two possible implementations? We're going to need to support this for our current work but I'm always a bit cautious when we're talking about expanding interfaces.

metcalf commented 8 years ago

Closing in favor of #584.