Ping production instance before backing up the db

This commit is contained in:
Claudio Ortolina
2025-02-20 16:48:38 +00:00
parent 269cd4970f
commit 358dc10138
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
defmodule Mix.Tasks.MusicLibrary.Prod.Ping do
use Mix.Task
@shortdoc "Ping the production instance"
@moduledoc """
Ping the production instance - useful to wake it up if suspended.
"""
@impl Mix.Task
def run(_args) do
Application.ensure_all_started(:req)
Mix.Shell.IO.info("Pinging the production instance")
Req.get!("https://music-library.claudio-ortolina.org/api")
end
end