View Source Edeliver.Relup.Instructions.Sleep (edeliver v1.9.2)
This upgrade instruction is intended for testing only
and just sleeps the given amount of seconds. This can be used to test instructions which suspend processes at the beginning of the upgrade before the new code is installed. Usage:
Edeliver.Relup.Instructions.Sleep.modify_relup(config, _seconds = 30)
It prints a countown in the upgrade script which was
started by the $APP/bin/$APP upgrade $RELEASE
command.
Link to this section Summary
Functions
Callback implementation for Edeliver.Relup.RunnableInstruction.arguments/2
.
Calls the run/1
function of this module
Callback implementation for Edeliver.Relup.RunnableInstruction.dependencies/0
.
Appends this instruction to the instructions after the "point of no return"
Callback implementation for Edeliver.Relup.Instruction.modify_relup/2
.
Waits the given amount of seconds and prints a countdown
Link to this section Functions
@spec arguments( %Edeliver.Relup.Instructions{ changed_modules: term(), down_instructions: term(), down_version: term(), up_instructions: term(), up_version: term() }, Edeliver.Relup.Config.t() ) :: term()
Callback implementation for Edeliver.Relup.RunnableInstruction.arguments/2
.
@spec call_this(arguments :: [term()]) :: Instruction.instruction() | Instruction.instructions()
Calls the run/1
function of this module
from the relup file during hot code upgrade
@spec dependencies() :: [instruction_module :: atom()]
Callback implementation for Edeliver.Relup.RunnableInstruction.dependencies/0
.
@spec insert_where() :: Instruction.insert_fun()
Appends this instruction to the instructions after the "point of no return"
but before any instruction which loads or unloads new code, (re-)starts or stops any running processes, or (re-)starts or stops any application or the emulator.
Callback implementation for Edeliver.Relup.Instruction.modify_relup/2
.
@spec modify_relup( instructions :: Edeliver.Relup.Instructions.t(), config :: Edeliver.Relup.Config.t(), seconds :: integer() ) :: Edeliver.Relup.Instructions.t()
@spec run(seconds :: integer()) :: :ok
Waits the given amount of seconds and prints a countdown
in the upgrade script which was started by the
$APP/bin/$APP upgrade $RELEASE
command.