chore(update_appup): do not use load_module if restart_application
Since the appup instruction `restart_application` already loads all modules of a given application, there is no need to introduce those instructions if a restart is already present.
This commit is contained in:
parent
3ff6661a58
commit
e1e72c144a
|
@ -295,11 +295,18 @@ do_merge_update_actions(App, Vsn, {New0, Changed0, Deleted0}, OldActions) ->
|
|||
New = New0 -- AlreadyHandled,
|
||||
Changed = Changed0 -- AlreadyHandled,
|
||||
Deleted = Deleted0 -- AlreadyHandled,
|
||||
[{load_module, M, brutal_purge, soft_purge, []} || M <- Changed ++ New] ++
|
||||
Reloads = [{load_module, M, brutal_purge, soft_purge, []}
|
||||
|| not contains_restart_application(App, OldActions),
|
||||
M <- Changed ++ New],
|
||||
Reloads ++
|
||||
OldActions ++
|
||||
[{delete_module, M} || M <- Deleted] ++
|
||||
AppSpecific.
|
||||
|
||||
%% If an entry restarts an application, there's no need to use
|
||||
%% `load_module' instructions.
|
||||
contains_restart_application(Application, Actions) ->
|
||||
lists:member({restart_application, Application}, Actions).
|
||||
|
||||
%% @doc Process the existing actions to exclude modules that are
|
||||
%% already handled
|
||||
|
|
Loading…
Reference in New Issue