I want to run some ruby script from controller of rails application after certain action is done and view is rendered.
The operations of this script include file zipping and uploading and after that waiting for an answer from remote listener, so I suppose it need to be done asynchronously. Is there any way to run ruby script in such manner just from rails app?
Or it would be more appropriate to write script with endless loop, which periodically request my database for changes and then sleep?
Add a comment
|
2 Answers
What about background job, for example delayed_job, or resque? They will allow you to queue several jobs and process them later.