Misc refactors 2024-03-15 (#90)

* Fixed TV show output template

* Discard jobs if record not found; hopefully addressed timing-related source deletion bug
This commit is contained in:
Kieran
2024-03-15 12:29:02 -07:00
committed by GitHub
parent fbe21cb304
commit 7a7e8080cd
13 changed files with 54 additions and 9 deletions
@@ -6,6 +6,8 @@ defmodule Pinchflat.SlowIndexing.MediaCollectionIndexingWorker do
unique: [period: :infinity, states: [:available, :scheduled, :retryable]],
tags: ["media_source", "media_collection_indexing"]
require Logger
alias __MODULE__
alias Pinchflat.Tasks
alias Pinchflat.Sources
@@ -90,6 +92,9 @@ defmodule Pinchflat.SlowIndexing.MediaCollectionIndexingWorker do
# perform a no-op
:ok
end
rescue
Ecto.NoResultsError -> Logger.info("#{__MODULE__} discarded: source #{source_id} not found")
Ecto.StaleEntryError -> Logger.info("#{__MODULE__} discarded: source #{source_id} stale")
end
defp reschedule_indexing(source) do