Ruby on Rails
Friday, September 1, 2017
On Friday, September 1, 2017 at 7:31:14 PM UTC+1, Hassan Schroeder wrote:
-- On Fri, Sep 1, 2017 at 11:00 AM, Ben Edwards <lo...@funkytwig.com> wrote:
> So I take it I need to run this from the rails app directory? Where should I
> put the scripts, vendor maybe?
I normally put them in the /lib directory.
Yes, that was what I thought (after a bit more googling). Would it be OK to create a scripts directory under lib to put the ,rb scripts in. Also I have a module, so I guess I should put this in lib/modulename·
Now a bit of context is probably needed. I will have quite a lot of scripts (possibly 40, each one is a web scraper). They do very gentle scraping (i.e. a http request every 15 seconds) so currently I run them concurrently using cron. Doing this all within rails seems a great idea but I am worried about the (resource) cost of doing this (initializing 40 rails environments) will be quite high. Did some googeling and could not find out what the cost is. Don't want to put undue stress on the server so although I like the ideal it may be better to keep them as separate stand alone scripts outside rails. Like I said I would rather run them inside rails. What so you think?
--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/322c3558-f4fc-4780-baf1-ef3390eddc7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment