|
23 | 23 | is_running/1, environment/0, rotate_logs/1, force_event_refresh/1, |
24 | 24 | start_fhc/0]). |
25 | 25 | -export([start/2, 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_location/1, config_files/0, decrypt_config/2]). %% for testing and mgmt-agent |
28 | 28 |
|
29 | 29 | %%--------------------------------------------------------------------------- |
|
217 | 217 | %%---------------------------------------------------------------------------- |
218 | 218 |
|
219 | 219 | -type file_suffix() :: binary(). |
| 220 | +-type restart_type() :: 'permanent' | 'transient' | 'temporary'. |
220 | 221 | %% this really should be an abstract type |
221 | 222 | -type log_location() :: 'tty' | 'undefined' | file:filename(). |
222 | 223 | -type param() :: atom(). |
|
253 | 254 | -spec boot_delegate() -> 'ok'. |
254 | 255 | -spec recover() -> 'ok'. |
255 | 256 | -spec start_apps([app_name()]) -> 'ok'. |
| 257 | +-spec start_apps([app_name()], [{app_name(), restart_type()}]) -> 'ok'. |
256 | 258 | -spec stop_apps([app_name()]) -> 'ok'. |
257 | 259 |
|
258 | 260 | %%---------------------------------------------------------------------------- |
@@ -474,6 +476,9 @@ stop_and_halt() -> |
474 | 476 | ok. |
475 | 477 |
|
476 | 478 | start_apps(Apps) -> |
| 479 | + start_apps(Apps, []). |
| 480 | + |
| 481 | +start_apps(Apps, RestartTypes) -> |
477 | 482 | app_utils:load_applications(Apps), |
478 | 483 |
|
479 | 484 | ConfigEntryDecoder = case application:get_env(rabbit, config_entry_decoder) of |
@@ -513,7 +518,8 @@ start_apps(Apps) -> |
513 | 518 | true -> ok %% will run during start of rabbit app |
514 | 519 | end, |
515 | 520 | ok = app_utils:start_applications(OrderedApps, |
516 | | - handle_app_error(could_not_start)). |
| 521 | + handle_app_error(could_not_start), |
| 522 | + RestartTypes). |
517 | 523 |
|
518 | 524 | %% This function retrieves the correct IoDevice for requesting |
519 | 525 | %% input. The problem with using the default IoDevice is that |
|
0 commit comments