开发者

What is the best way to geocode large sets as a background process in Ruby on Rails?

开发者 https://www.devze.com 2022-12-09 22:22 出处:网络
I am implementing a contact importer and will be geocoding the contacts that are imported.If a user imports 1000 contacts, geocoding is way too slow.Essentially开发者_如何学Python I would like to star

I am implementing a contact importer and will be geocoding the contacts that are imported. If a user imports 1000 contacts, geocoding is way too slow. Essentially开发者_如何学Python I would like to start a background process to geocode the contacts after they are imported and somehow report the status to a log.

Does this sound like the best way to do this? If so, can I do this with some simple ruby/rails? I have the javan-whenever gem which is essentially a ruby API for CRON but I would rather this be an immediately spawned background process after importing.


There's also Delayed Job.


There are a couple of plugins that can help you do this:

  1. BackgroundDRb
  2. Spawn


Tony, you might want to check out http://www.simpleworker.com too, takes care of all the processing management and monitoring as well as scheduling (like cron) if you need it.

0

精彩评论

暂无评论...
验证码 换一张
取 消