|
23 | 23 | is_running/1, environment/0, rotate_logs/0, force_event_refresh/1,
|
24 | 24 | start_fhc/0]).
|
25 | 25 | -export([start/2, stop/1, prep_stop/1]).
|
26 |
| --export([start_apps/1, stop_apps/1]). |
| 26 | +-export([start_apps/1, start_apps/2, stop_apps/1]). |
27 | 27 | -export([log_locations/0, config_files/0, decrypt_config/2]). %% for testing and mgmt-agent
|
28 | 28 |
|
29 | 29 | -ifdef(TEST).
|
|
266 | 266 | -spec boot_delegate() -> 'ok'.
|
267 | 267 | -spec recover() -> 'ok'.
|
268 | 268 | -spec start_apps([app_name()]) -> 'ok'.
|
| 269 | +-spec start_apps([app_name()], |
| 270 | + #{app_name() => permanent|transient|temporary}) -> 'ok'. |
269 | 271 | -spec stop_apps([app_name()]) -> 'ok'.
|
270 | 272 |
|
271 | 273 | %%----------------------------------------------------------------------------
|
@@ -506,6 +508,9 @@ stop_and_halt() ->
|
506 | 508 | ok.
|
507 | 509 |
|
508 | 510 | start_apps(Apps) ->
|
| 511 | + start_apps(Apps, #{}). |
| 512 | + |
| 513 | +start_apps(Apps, AppModes) -> |
509 | 514 | app_utils:load_applications(Apps),
|
510 | 515 |
|
511 | 516 | ConfigEntryDecoder = case application:get_env(rabbit, config_entry_decoder) of
|
@@ -545,7 +550,8 @@ start_apps(Apps) ->
|
545 | 550 | true -> ok %% will run during start of rabbit app
|
546 | 551 | end,
|
547 | 552 | ok = app_utils:start_applications(OrderedApps,
|
548 |
| - handle_app_error(could_not_start)). |
| 553 | + handle_app_error(could_not_start), |
| 554 | + AppModes). |
549 | 555 |
|
550 | 556 | %% This function retrieves the correct IoDevice for requesting
|
551 | 557 | %% input. The problem with using the default IoDevice is that
|
|
0 commit comments