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 18:29:02 -07:00
committed by GitHub
parent b633d0f75c
commit 6e7e8dc96c
13 changed files with 54 additions and 9 deletions
@@ -9,6 +9,8 @@ defmodule Pinchflat.Metadata.SourceMetadataStorageWorker do
# in an infinite loop.
unique: [period: 600]
require Logger
alias __MODULE__
alias Pinchflat.Repo
alias Pinchflat.Tasks
@@ -47,5 +49,8 @@ defmodule Pinchflat.Metadata.SourceMetadataStorageWorker do
})
:ok
rescue
Ecto.NoResultsError -> Logger.info("#{__MODULE__} discarded: source #{source_id} not found")
Ecto.StaleEntryError -> Logger.info("#{__MODULE__} discarded: source #{source_id} stale")
end
end