Pull requests / #1210

#1210 populate '/models' also in lazy mode

closed · @vehystrix · 0 commentaires · Sur GitHub

Description

Currently starting the server in lazy mode (`--lazy`) shows no models on the `/models` endpoint. It only gets populated as soon as the model actually gets loaded, and stays populated even when a model gets unloaded after.

With this surgical fix, the endpoint is populated even before the first load:
 - mock engine -> not a `StrataEngine`; it already lists as loaded via the no-alive path - unchanged.
 - cold-lazy start -> not a `MockEngine`, is a` StrataEngine` -> listed as "unloaded".
 - loaded after one cycle / idle-unloaded -> still a `StrataEngine`, same branch.
 - loading/running -> `alive()` true -> `svc.loaded()` true -> falls through, listed as "loaded" - unchanged.

Sur le site

Liens install, modèles, releases.