Open SevereOverfl0w opened 4 years ago
Example above doesn't make much sense. The DB connection would just have migrations run as part of :post-start
. If something was conditional (e.g. on quartz) it wouldn't be duplicate as part of the :pre-start
.
Will wait for there to be a use-case for this. Contributions welcome here.
{:components
{:a (io/resource "public")
:figwheel (run-the-build)}}}
This won't work on first run as :a
depends on the side effects caused by :figwheel
, but doesn't depend on it's value.
If multiple components have the same :pre-start, it should be possible to "deduplicate" them. A common example would be wanting migrations to run before both a DB connection component, and something else which uses JDBC directly (e.g. quartz).
We want run-once behaviour, but we want it to be explicit somehow. It should perhaps have a different name from :pre-start.