Format mix task info messages to improve readability
This commit is contained in:
@@ -11,7 +11,7 @@ defmodule Mix.Tasks.MusicLibrary.Prod.DbMigrate do
|
||||
|
||||
@impl Mix.Task
|
||||
def run(_args) do
|
||||
Mix.Shell.IO.info("Running migrations on production database")
|
||||
Mix.Shell.IO.info("==> Running migrations on production database")
|
||||
|
||||
fly_ssh("bin/migrate")
|
||||
end
|
||||
|
||||
@@ -10,7 +10,7 @@ defmodule Mix.Tasks.MusicLibrary.Prod.DbPull do
|
||||
|
||||
@impl Mix.Task
|
||||
def run(_args) do
|
||||
Mix.Shell.IO.info("Pulling the latest database from the production server")
|
||||
Mix.Shell.IO.info("==> Pulling the latest database from the production server")
|
||||
|
||||
current_time = DateTime.utc_now()
|
||||
remote_db = "/mnt/music_library/music_library_prod.db"
|
||||
@@ -22,9 +22,9 @@ defmodule Mix.Tasks.MusicLibrary.Prod.DbPull do
|
||||
System.halt(1)
|
||||
|
||||
{_stream, 0} ->
|
||||
Mix.Shell.IO.info("Database pulled successfully")
|
||||
Mix.Shell.IO.info("==> Database pulled successfully")
|
||||
|
||||
Mix.Shell.IO.info("Restoring as local dev database")
|
||||
Mix.Shell.IO.info("==> Restoring as local dev database")
|
||||
|
||||
Path.wildcard("data/music_library_dev.db*")
|
||||
|> Enum.each(&File.rm!/1)
|
||||
|
||||
@@ -12,7 +12,7 @@ defmodule Mix.Tasks.MusicLibrary.Prod.DbVacuum do
|
||||
|
||||
@impl Mix.Task
|
||||
def run(_args) do
|
||||
Mix.Shell.IO.info("Running VACUUM on the production database")
|
||||
Mix.Shell.IO.info("==> Running VACUUM on the production database")
|
||||
|
||||
command = ~s(bin/music_library rpc 'MusicLibrary.Repo.vacuum\(\)')
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ defmodule Mix.Tasks.MusicLibrary.Prod.Ping do
|
||||
@impl Mix.Task
|
||||
def run(_args) do
|
||||
Application.ensure_all_started(:req)
|
||||
Mix.Shell.IO.info("Pinging the production instance")
|
||||
Mix.Shell.IO.info("==> Pinging the production instance")
|
||||
|
||||
Req.get!("https://music-library.claudio-ortolina.org/api")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user