fix async processing for ugoira

This commit is contained in:
r888888888
2014-10-22 22:48:20 -07:00
parent e8f973601c
commit 69564c4bff
4 changed files with 90 additions and 89 deletions

View File

@@ -10,7 +10,8 @@ class PixivUgoiraService
end
def generate_resizes(source_path, output_path, preview_path)
PixivUgoiraConverter.delay(:queue => Socket.gethostname).convert(source_path, output_path, preview_path, @frame_data)
# Run this a bit in the future to give the upload process time to move the file
PixivUgoiraConverter.delay(:queue => Socket.gethostname, :run_at => 2.seconds.from_now).convert(source_path, output_path, preview_path, @frame_data)
# since the resizes will be delayed, just touch the output file so the
# file distribution wont break