Hello,<div><br> </div><div>I am trying to build an application that will parse thousands of XML Feeds in continue in the back.</div><div>I really have no idea on how to do this "correctly" with Rails.</div><div><br>
</div><div>Here is my code :</div><div><br> </div><div><div>class Feed < ActiveRecord::Base</div><div> def parse</div><div><span class="Apple-tab-span" style="white-space:pre">        </span> # Parsing using external lib (syndication gem)<br>
</div><div> end</div><div>end</div><div><br> </div><div><div>class FeedsController < ApplicationController</div><div> def parse</div><div> feed = Feed.find(params[:id])</div><div> feed.parse</div><div> end</div>
<div>end</div></div></div><div><br> </div><div>So for now, if I want to parse all my feeds forever, what I have to do is to call <a href="http://myapp/feeds/1/parse">http://myapp/feeds/1/parse</a>, and then <a href="http://myapp/feeds/2/parse">http://myapp/feeds/2/parse</a> ...</div>
<div>This is definetely not a good solution!</div><div><br> </div><div>How can I use <span class="Apple-style-span" style="white-space: pre; ">Backgroundrb to do this?</span></div><div><span class="Apple-style-span" style="white-space: pre;"><br>
</span></div><div><span class="Apple-style-span" style="white-space: pre;">Thanks for your help!</span></div><div><br> </div><div>--<br>Julien Genestoux<br><a href="mailto:julien.genestoux@gmail.com">julien.genestoux@gmail.com</a><br>
+1 (415) 254 7340<br>+33 (0)8 70 44 76 29
</div>