Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common pre-start deduplication #8

Open
SevereOverfl0w opened this issue Apr 7, 2020 · 2 comments
Open

Common pre-start deduplication #8

SevereOverfl0w opened this issue Apr 7, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@SevereOverfl0w
Copy link
Collaborator

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.

@SevereOverfl0w SevereOverfl0w added the enhancement New feature or request label Apr 7, 2020
@SevereOverfl0w
Copy link
Collaborator Author

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.

@SevereOverfl0w
Copy link
Collaborator Author

{: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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant