I’ve read the docs, but I’m unsure how to integrate it into my application. Currently I have a user input a video url, I take that url and make it a link in the view. Then I use the Embedly API to find that link and replace it with an embedded video, thumbnail, and title. However, this process takes a bit too long, so I’m thinking of using delayed_job to speed up this process. How should I go about doing this? I’d like to also save the dynamically generated title returned from the Embedly API into my database so users can edit it later.
Share
DJ jobs can be anything. Did you read the DJ tutorial? If you have a Video model, use an after_save callback that calls a function, say, generate_video_widget(), via DJ, like so:
self.delay.generate_video_widget()
It’s up to you to implement generate_video_widget() to do the things you need it to do.