create an `:mb-run-mode` config property which defaults to "prod" and add...
create an `:mb-run-mode` config property which defaults to "prod" and add couple predicate functions in our config ns for checking `is-prod?` and `is-test?`. then update our event listener startup calls and wrap them with `(when (config/is-prod?) ...)` so that we only start them up when we intend to run the app for real. lastly, update our environment for our expectations unit tests so that :mb-run-mode is "test" and thus our event processing listeners are not started for unit tests.
Showing
- project.clj 2 additions, 1 deletionproject.clj
- src/metabase/config.clj 4 additions, 0 deletionssrc/metabase/config.clj
- src/metabase/events/activity_feed.clj 4 additions, 1 deletionsrc/metabase/events/activity_feed.clj
- src/metabase/events/revision.clj 4 additions, 1 deletionsrc/metabase/events/revision.clj
- src/metabase/events/view_log.clj 4 additions, 1 deletionsrc/metabase/events/view_log.clj
Please register or sign in to comment