Define MusicLibrary.Repo.vacuum/0
This commit is contained in:
@@ -14,7 +14,7 @@ defmodule Mix.Tasks.MusicLibrary.Prod.DbVacuum do
|
|||||||
def run(_args) do
|
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.query\("VACUUM"\)')
|
command = ~s(bin/music_library rpc 'MusicLibrary.Repo.vacuum\(\)')
|
||||||
|
|
||||||
fly_ssh(command)
|
fly_ssh(command)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -32,4 +32,6 @@ defmodule MusicLibrary.Repo do
|
|||||||
"#{name}.#{extension}"
|
"#{name}.#{extension}"
|
||||||
])
|
])
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def vacuum, do: query("VACUUM")
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user