on_maintenance v0.5.2 Mix.Tasks.Maintenance.Enable

Sets an application to maintenance mode. It can accept --retry-after as argument.

mix maintenance.enable [--retry-after]

Options

  • --retry-after - integer value in seconds. This will be set as “retry_after” for a 503 response. This will tell the client how much time it will wait before the application can be used again.

Examples

mix maintenance.enable # Just enable maintenance mode on. Waiting time is indefinite.

With --retry-after (in seconds)

mix maintenance.enable --retry-after=300 # Maintenace mode will last for 5 minutes.

Summary

Functions

A task needs to implement run which receives a list of command line args

Functions

run(argv)

A task needs to implement run which receives a list of command line args.

Callback implementation for Mix.Task.run/1.