mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-01-20 06:37:59 +01:00
mark image as generating thumbnails when replaced or repaired
This commit is contained in:
parent
982adb9ba5
commit
31b1704847
1 changed files with 4 additions and 0 deletions
|
@ -159,6 +159,10 @@ defmodule Philomena.Images do
|
|||
end
|
||||
|
||||
def repair_image(%Image{} = image) do
|
||||
Image
|
||||
|> where(id: ^image.id)
|
||||
|> Repo.update_all(set: [thumbnails_generated: false, processed: false])
|
||||
|
||||
Philomena.Images.Thumbnailer.generate_thumbnails(image.id)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue