Code related to tracking the progress of metabase initialization.
This is kept in a separate, tiny namespace so it can be loaded right away when the application launches
(and so we don't need to wait for | (ns metabase.core.initialization-status) |
(defonce ^:private progress-atom (atom 0)) | |
Is Metabase initialized and ready to be served? | (defn complete? [] (= @progress-atom 1.0)) |
Get the current progress of Metabase initialization. | (defn progress [] @progress-atom) |
Update the Metabase initialization progress to a new value, a floating-point value between | (defn set-progress! [^Float new-progress] {:pre [(float? new-progress) (<= 0.0 new-progress 1.0)]} (reset! progress-atom new-progress)) |
Complete the Metabase initialization by setting its progress to 100%. | (defn set-complete! [] (set-progress! 1.0)) |