the paperclip-delay gem supports this already by adding a processing column to your database. it will be set when the processing is finished. The info is in the README
Rails: Paperclip-delay detect when job finished
-
19-09-2022 - |
Pergunta
hi i'm kinda noob in this ..
i'm using paperclip-delay to throw the image processing in the background on resque and i'm trying to trigger action after the job finished..
i tried forking the gem and add the action myself in it but that looks like an ugly approach ..like it appear in this question's answer Knowing when resque worker had completed job
also thought of ripping some code from the gem and use it directly in my model
is there any other ideas
========Edited
i used
if @video.save
Delayed::Worker.new.work_off
@video.reload
put 'aheee'
respond_to do |format|
format.html {redirect_to videos_path, notice: 'Video uploaded and will be converted shortly '}
end
like referenced in the gem README and it give me
uninitialized constant ImagesController::Delayed
i have no idea
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow