edeliver_fork v1.4.5 Edeliver.Relup.PhoenixModification
This module provides default modifications of the relup instructions for phoenix apps.
It performs the following steps:
Checking whether the upgrade is possible
- by checking whether there are processes running old code (from a previous upgrade)
- by checking whether the ranch acceptor processes can be found
- by checking whether ranch connection processes can be found
or canceling the upgrade if one of the checks fails.
Preparing the upgrade
- by suspending all ranch acceptors to avoid accepting new connections / requests during the hot code upgrade
- by suspending phoenix channels
- by waiting a short time until running requests are finished and notifying the remaining that an upgrades starts (this allows to rerun failed requests later)
Executing the upgrade
- by using
:soft_purge
instead of:brutal_purge
when loading new code - by suspending all processes running code of changed modules
- by calling
code_change
at this processes - by resuming that processes
- by using
Finishing the upgrade
- by rerunning requests that failed during the upgrade
- by resuming all phoenix channels
- by resuming all ranch acceptors to continue accepting new connections
Summary
Functions
Returns the priority Edeliver.Relup.Modification.priority_default/0
+1
Returns true if the current project is a phoenix project
Functions
Specs
priority :: non_neg_integer
Returns the priority Edeliver.Relup.Modification.priority_default/0
+1
.
Unless the module is set by the RELUP_MODIFICATION_MODULE
env or
the --relup-mod=
command line option the module with the highest priority
is used (which is also usable).
Specs
usable?(Edeliver.Relup.Config.t) :: boolean
usable?(Edeliver.Relup.Config.t) :: boolean
Returns true if the current project is a phoenix project