diff --git a/fly.toml b/fly.toml index 01ac664..4f9205d 100644 --- a/fly.toml +++ b/fly.toml @@ -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" \ No newline at end of file diff --git a/lib/live_beats/application.ex b/lib/live_beats/application.ex index f310e6e..4a2b3da 100644 --- a/lib/live_beats/application.ex +++ b/lib/live_beats/application.ex @@ -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} diff --git a/lib/live_beats/songs_cleaner.ex b/lib/live_beats/songs_cleaner.ex index 686dd2a..acd2e6f 100644 --- a/lib/live_beats/songs_cleaner.ex +++ b/lib/live_beats/songs_cleaner.ex @@ -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__) diff --git a/lib/live_beats_web/live/profile_live.ex b/lib/live_beats_web/live/profile_live.ex index 181dbe8..eec098d 100644 --- a/lib/live_beats_web/live/profile_live.ex +++ b/lib/live_beats_web/live/profile_live.ex @@ -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 diff --git a/lib/live_beats_web/live/profile_live/upload_form_component.html.heex b/lib/live_beats_web/live/profile_live/upload_form_component.html.heex index 9a4e84a..742ffb6 100644 --- a/lib/live_beats_web/live/profile_live/upload_form_component.html.heex +++ b/lib/live_beats_web/live/profile_live/upload_form_component.html.heex @@ -1,5 +1,7 @@
-

<%= @title %>

+

<%= @title %> +

(songs expire every six hours)

+

<.form for={:songs}