Add more aggressive expiration and tell user about it

This commit is contained in:
Chris McCord 2022-02-02 08:38:15 -05:00
parent 9f5abd842a
commit ef4097c0a3
5 changed files with 8 additions and 5 deletions

View file

@ -39,7 +39,7 @@ processes = []
port = 443
[[services.tcp_checks]]
grace_period = "10s" # allow some time for startup
grace_period = "20s" # allow some time for startup
interval = "15s"
restart_limit = 0
timeout = "2s"

View file

@ -29,7 +29,8 @@ defmodule LiveBeats.Application do
name: PresenceClient},
# Start the Endpoint (http/https)
LiveBeatsWeb.Endpoint,
{LiveBeats.SongsCleaner, interval: {7, :day}}
# Expire songs every six hours
{LiveBeats.SongsCleaner, interval: {3600 * 6, :second}}
# Start a worker by calling: LiveBeats.Worker.start_link(arg)
# {LiveBeats.Worker, arg}

View file

@ -6,7 +6,7 @@ defmodule LiveBeats.SongsCleaner do
alias LiveBeats.MediaLibrary
@poll_interval :timer.minutes(60)
@poll_interval :timer.minutes(30)
def start_link(opts) do
GenServer.start_link(__MODULE__, opts, name: __MODULE__)

View file

@ -238,7 +238,7 @@ defmodule LiveBeatsWeb.ProfileLive do
defp apply_action(socket, :new, _params) do
if socket.assigns.owns_profile? do
socket
|> assign(:page_title, "Add Songs")
|> assign(:page_title, "Add Music")
|> assign(:song, %MediaLibrary.Song{})
|> show_upload_modal()
else

View file

@ -1,5 +1,7 @@
<div>
<h2><%= @title %></h2>
<h2><%= @title %>
<p class="inline text-gray-500 text-sm ml-2">(songs expire every six hours)</p>
</h2>
<.form
for={:songs}