You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.
I am running a video processing engine with Paperclip and Delayed_paperclip gems.
Everything works fine, but I need to trigger some things when processing is done (sending emails, copy some files somewhere else, etc). Problem is that I do not know when is ready.
I know that there is a column in DB media_processing that gets updated when the processing is done, but to use that, I have to use another table and store there any video when processing is starting, then to keep pooling the db to see which one got processing status changed.
I tried after_processing in paperclip, after_update in video model, nothing works.
My question is: How to set a callback to execute some code when processing is done.
The text was updated successfully, but these errors were encountered:
I have a similar use case to yours. Both callbacks provided by Paperclip (after_processing :enqueue_upload and after_foo_processing :enqueue_upload) work for me to enqueue another job. This makes sense because DelayedPaperclip::ProcessJob ultimately calls Paperclip's save method (via reprocess!).
The gotcha for me was that I am running my background processor (Que) in a separate process so I needed to stop en start it every time I made changes that I wanted to test. Afaik so far only Sidekiq has adopted the new code reloading mechanism in Rails 5 to hot reload job classes for every file change.
This is what works for me on Paperclip 5.1.0 and DelayedPaperclip 3.0.1:
I am running a video processing engine with Paperclip and Delayed_paperclip gems.
Everything works fine, but I need to trigger some things when processing is done (sending emails, copy some files somewhere else, etc). Problem is that I do not know when is ready.
I know that there is a column in DB media_processing that gets updated when the processing is done, but to use that, I have to use another table and store there any video when processing is starting, then to keep pooling the db to see which one got processing status changed.
I tried after_processing in paperclip, after_update in video model, nothing works.
My question is: How to set a callback to execute some code when processing is done.
The text was updated successfully, but these errors were encountered: