Clarified documentation

This commit is contained in:
Kieran Eglin 2024-01-26 11:28:48 -08:00
parent 445e7c7417
commit 6bc5086459
No known key found for this signature in database
GPG key ID: 193984967FCF432D

View file

@ -148,11 +148,11 @@ defmodule Pinchflat.MediaSource do
defp maybe_run_indexing_task(changeset, channel) do defp maybe_run_indexing_task(changeset, channel) do
case changeset.data do case changeset.data do
# If the changeset is new (not persisted), start indexing no matter what # If the changeset is new (not persisted), attempt indexing no matter what
%{__meta__: %{state: :built}} -> %{__meta__: %{state: :built}} ->
ChannelTasks.kickoff_indexing_task(channel) ChannelTasks.kickoff_indexing_task(channel)
# If the record has been persisted, only run indexing if the # If the record has been persisted, only attempt indexing if the
# indexing frequency has been changed # indexing frequency has been changed
%{__meta__: %{state: :loaded}} -> %{__meta__: %{state: :loaded}} ->
if Map.has_key?(changeset.changes, :index_frequency_minutes) do if Map.has_key?(changeset.changes, :index_frequency_minutes) do